JumpToObject(object, int)

From NWN Lexicon
Revision as of 20:24, 1 August 2020 by Jasperre (talk | contribs) (Remarks)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Teleports the calling object to the nearest valid location by the target.

void JumpToObject(
    object oToJumpTo,
    int nWalkStraightLineToPoint = TRUE
);

Parameters

oToJumpTo
Target object that will be jumped to.
nWalkStraightLineToPoint
Unused. (Default: TRUE)

Description

The calling object will be instantly relocated to the position of oTarget (or as near as possible). This function will work within or across area borders.

If oTarget isn't a valid object (or is unspecified) the function call will fail.

The action produces no visual effect.

Remarks

Does not affect dead or dying creatures.

Like all spawn and jump-type commands, this will place the calling object in the nearest valid location to the oToJumpTo.

When a PC leaves an Area or Trigger because you've jumped to a location causes the OnExit event of the departed object to fire.

Does not affect creatures that are dead; they must have HP above 0 for this function to work properly, and must be commandable.

Speculation: The nWalkStraightLineToPoint parameter should make the caller of the function walk to the target if very close to it. This does not happen, and in fact, changing it to FALSE doesn't seem to have any effect. If anyone figures out what this parameter is for, please use the link at the bottom of the page to send the Lexicon's authors a comment on this function.

Version

1.61

See Also

functions: 

JumpToLocation



 author: Charles Feduke, editor: Jasperre, additional contributor(s): Keven Knuth, Enigmatic