Difference between revisions of "Osiris/API/UnlockWaypoint"

From Divinity Engine Wiki
Jump to: navigation, search
m (Mention SetHomesteadKeyState)
m
 
Line 15: Line 15:
 
* Helper [[Osiris/Shared/DB_WaypointInfo|DB_WaypointInfo]]
 
* Helper [[Osiris/Shared/DB_WaypointInfo|DB_WaypointInfo]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|UnlockWaypoint]]

Latest revision as of 17:28, 19 December 2017

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