Arma 3 Scripting

setPosASL

  • Global argument
  • Global effect
  • Arma 3 v0.50
  • First in Operation Flashpoint: Elite v1.00

Command · Markdown · JSON · original wiki page

Description

Sets the object position above sea level. Given position must be in PositionASL format.

Syntax

object setPosASL pos

Parameters:

Returns: Nothing

Examples

Example 1

player setPosASL [getPosASL player select 0, (getPosASL player select 1) + 10, getPosASL player select 2];

Example 2

_position = getPosASL _object;
_position set [2, 10]; // 10m above sea level
_object setPosASL _position;

See also

ASLToATL · ATLToASL · getPos · getPosASL · getPosATL · position · setPos · setPosASL2 · setPosATL · getTerrainHeightASL · setPosWorld · setVehiclePosition

Community notes

Hypoxic125

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.

if !(isNull objectParent _unit) then {
    [_unit, [0,0,0]] remoteExec ["setPosASL", _unit];
};