Osiris/API/UnlockWaypoint

From Divinity Engine Wiki
Revision as of 22:09, 28 October 2017 by Tinkerer (talk | contribs) (Mention SetHomesteadKeyState)
Jump to: navigation, search
Full Definition(s)
  • call UnlockWaypoint((STRING)_WaypointName, (TRIGGERGUID)_Trigger, (CHARACTERGUID)_Character)
Description

Unlocks the waypoint that was registered using _WaypointName for _Character, so that it appears in their waypoint list. When they choose to go to the waypoint, they will be teleported to _Trigger.

Notes
  • If no waypoint has been registered with the name _WaypointName yet, this call will not do anything.
  • _Trigger must be global, otherwise this call will not do anything. The reason is the engine supports going to a waypoint in another level, and only global objects can be referenced while in another level.
  • Unlocking a waypoint for a character only unlocks it for that specific character. This means you have to unlock it for each player individually.
  • You can use the shared mod helper DB_WaypointInfo to register waypoints and to support easily locking/unlocking them per party.
  • Unlocking a waypoint this way does not automatically enable the anchor/waypoint travel button near the minimap, unless your mod depends on the main campaign. To enable it manually, see SetHomesteadKeyState
See Also