position: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 35: | Line 35: | ||
|r2= [[Array]] - format [x,y,z], where z is {{hl|-1 * [[getTerrainHeightASL]]}} at the location | |r2= [[Array]] - format [x,y,z], where z is {{hl|-1 * [[getTerrainHeightASL]]}} at the location | ||
|x1= <code>private _pos = | |x1= <code>private _pos = position [[player]];</code> | ||
|x2= <code>_myLocationHomePos = position myLocation;</code> | |x2= <code>_myLocationHomePos = position myLocation;</code> |
Revision as of 11:13, 12 May 2022
Description
- Description:
- Returns position of an object (alias of getPos) or location (alias of locationPosition).
- Groups:
- Positions
Syntax
- Syntax:
- position object
- Parameters:
- object: Object
- Return Value:
- Array - format PositionAGLS
Alternative Syntax
- Syntax:
- position location
- Parameters:
- location: Location
- Return Value:
- Array - format [x,y,z], where z is -1 * getTerrainHeightASL at the location
Examples
- Example 1:
private _pos = position player;
- Example 2:
_myLocationHomePos = position myLocation;
Additional Information
- See also:
- getPos getPosATL getPosASL getPosASLW visiblePosition getPosVisual visiblePositionASL locationPosition
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Positions