{"name":"setPosASL","operator":null,"title":"setPosASL","type":"command","url":"https://community.bistudio.com/wiki/setPosASL","revid":377438,"updated":"2026-01-02T06:46:46Z","groups":["Positions"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"ofp","name":"Operation Flashpoint","version":"1.99"},{"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"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"global","server_exec":false},"exec":null,"description":"Sets the object position above sea level. Given position must be in PositionASL format.","syntaxes":[{"syntax":"object setPosASL pos","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"},{"name":"pos","type":"PositionASL","optional":false,"default":null,"description":null,"types":["PositionASL"],"since":null,"text":"pos: PositionASL"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"pos","types":["PositionASL"]}}],"examples":[{"text":"```sqf\nplayer setPosASL [getPosASL player select 0, (getPosASL player select 1) + 10, getPosASL player select 2];\n```","code":["player setPosASL [getPosASL player select 0, (getPosASL player select 1) + 10, getPosASL player select 2];"]},{"text":"```sqf\n_position = getPosASL _object;\n_position set [2, 10]; // 10m above sea level\n_object setPosASL _position;\n```","code":["_position = getPosASL _object;\n_position set [2, 10]; // 10m above sea level\n_object setPosASL _position;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ASLToATL","ATLToASL","getPos","getPosASL","getPosATL","position","setPos","setPosASL2","setPosATL","getTerrainHeightASL","setPosWorld","setVehiclePosition"],"notes":[{"user":"Hypoxic125","date":"2023-02-26T03:59:06Z","text":"As of Verson 2.10, if you use setPosX commands on a remote unit within a vehicle, the unit will remain in the vehicle. In order to avoid this, remoteExec the command to the remote client.\n\n```sqf\nif !(isNull objectParent _unit) then {\n    [_unit, [0,0,0]] remoteExec [\"setPosASL\", _unit];\n};\n```"}],"categories":[]}