getPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|GETPOS]]
[[Category:Scripting Commands|GETPOS]]
[[Category:Scripting Commands OFP 1.97|GETPOS]]
[[Category:Scripting Commands OFP 1.96|GETPOS]]
[[Category:Scripting Commands OFP 1.46|GETPOS]]
[[Category:Scripting Commands OFP 1.46|GETPOS]]
[[Category:Scripting Commands ArmA|GETPOS]]
[[Category:Scripting Commands ArmA|GETPOS]]

Revision as of 19:50, 1 June 2006


getPos obj


Operand types:

obj: Object

Type of returned value:

Array

Description: Object position in format Position

See also: setPos


Examples:

_pPos = getPos player

To get the x,y and z coordinates separately use:
_pPosX = getPos unitname select 0
_pPosY = getPos unitname select 1
_pPosZ = getPos unitname select 2