{"name":"getPosASL","operator":null,"title":"getPosASL","type":"command","url":"https://community.bistudio.com/wiki/getPosASL","revid":377441,"updated":"2026-01-02T06:46:51Z","groups":["Positions"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"},{"game":"ofp","name":"Operation Flashpoint","version":"1.99"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the object position height above sea level.","syntaxes":[{"syntax":"getPosASL object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"}],"returns":{"type":"PositionASL","types":["PositionASL"],"description":null,"text":"PositionASL"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}}],"examples":[{"text":"```sqf\n_aslPos = getPosASL player;\n```","code":["_aslPos = getPosASL player;"]},{"text":"```sqf\nhint format [\"position above sea level: %1\", (getPosASL player) select 2];\n```","code":["hint format [\"position above sea level: %1\", (getPosASL player) select 2];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getPosASLVisual","setPosASL","setPosASL2","position","getPos","getPosATL","getPosASLW","visiblePosition","visiblePositionASL","getTerrainHeightASL","setUnitFreefallHeight"],"notes":[{"user":"Dr Eyeball","date":"2007-02-23T07:38:00Z","text":"`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.\nThe 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**."},{"user":"SilentKiller","date":"2014-03-27T19:19:00Z","text":"According to Code Optimisation, this command is among the fastest (2x) and should be used (or getPosATL or, best performance-wise, getPosWorld) instead of getPos/position."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Positions","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}