Arma 3 Scripting

Command in Positions

getPosASL

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the object position height above sea level.

Syntax

getPosASL object

Parameters:

Returns: PositionASL

Examples

Example 1

_aslPos = getPosASL player;

Example 2

hint format ["position above sea level: %1", (getPosASL player) select 2];

See also

getPosASLVisual · setPosASL · setPosASL2 · position · getPos · getPosATL · getPosASLW · visiblePosition · visiblePositionASL · getTerrainHeightASL · setUnitFreefallHeight

Community notes

Dr Eyeball

getPosASL _obj select 2; might sometimes return the vertical position above sea level, but over land for stacked objects, it returns the vertical position above the object beneath it or at least affected by this offset. The same problem exists for getPos. There was a thread in the BIS forums which suggested the use of the command modelToWorld instead to get around this issue where an absolute vertical position is required. ArmA Ver 1.02.