This is an old revision of the document!
⇐ Index
GetUnitPosition(<-UID) ->pos
Get the 3D position of a unit. A vector is returned. The X and Z positions are where on the map the unit is, and the Y coordinate is the height, or elevation, of the unit.
Note: If this call is attempted on an non-existing unit, nothing will be put on the stack.
GetUnitPosition(<-UID) ->pos
A “safe” method to use this function and to handle the lack of a return value on non-existent units Are as follows:
Trace (@UnitPos(7) ) :unitPos StackSize ->size GetUnitPosition If (Stacksize <-size NEQ) V3(-1 -1 -1) endif
⇐ Index