GetPosition
From NWN Lexicon
Contents |
[edit] GetPosition(object)
Determines the position of a creature or object.
vector GetPosition( object oTarget );
[edit] Parameters
oTarget
[edit] Description
Returns the position (as a vector) of oTarget.
If oTarget is invalid or on other errors this function returns the vector (0.0f, 0.0f, 0.0f).
[edit] Version
1.61
[edit] Example
//Make the entering PC jump to the corresponding position //in a different area void main() { object oPC=GetEnteringObject(); if (!GetIsPC(oPC)) return; vector vPos=GetPosition(oPC); float fFacing=GetFacing(oPC); //Create a location in another area //"OTHER_AREA" is the tag of that other area object oArea=GetObjectByTag("OTHER_AREA"); location lNew=Location(oArea, vPos, fFacing); AssignCommand(oPC, JumpToLocation(lNew)); }
[edit] See Also
functions: |
author: Tom Cassiotis, editor: Lilac Soul