Osiris/API/TeleportToPosition

From Divinity Engine Wiki
Revision as of 15:28, 1 July 2018 by Tinkerer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • call TeleportToPosition((GUIDSTRING)_SourceObject, (REAL)_X, (REAL)_Y, (REAL)_Z, (STRING)_Event, (INTEGER)_TeleportLinkedCharacters)
Description

Teleports the object _SourceObject to the coordinates (_X, _Y, _Z). Once the object arrives there, the event _Event will be sent to _SourceObject. If _SourceObject is a player character and _TeleportLinkedCharacters is 1, then all characters currently chained to _SourceObject will also be teleported.

Notes
  • If _SourceObject is a character, then the _Y coordinate will be ignored and the character will snap to the floor at the destination location. If the destination location is not valid on the AI grid, the game will find a nearby valid location on the AI grid and place the character there.
  • See TeleportTo for other notes that also apply to this call, but note that this variant does not include the experimental support for teleporting triggers (it won't do anything for them). If you wish to teleport a trigger, use TeleportToPosition with an instance of the Helper_Invisible_A item root template and then a regular TeleportTo call to teleport the trigger to this helper.
See Also