Arma 3 Scripting

Command in Unit Control

moveOut

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

Description

Moves the soldier out of the vehicle.

Notes:

Syntax

Syntax 1

moveOut soldier

Parameters:

Returns: Nothing

Syntax 2

since arma3 2.06

soldier moveOut vehicle

Parameters:

Returns: Nothing

Examples

Example 1

{ if (lifeState _x == "UNCONSCIOUS") then { moveOut _x } } forEach crew cursorTarget;

Example 2

Move out player just before he dies:

player addEventHandler [
    "HandleDamage", 
    format [
        'if (switch (_this select 1) do {
            case "": { _this select 2 >= 1 };
            case "head": {_this select 2 >= %1};
            case "body": {_this select 2 >= %2};
            default {false};
        }) then {moveOut player}',
        getNumber (configFile >> "CfgFirstAid" >> "CriticalHeadHit"),
        getNumber (configFile >> "CfgFirstAid" >> "CriticalBodyHit")
    ]
];

See also

Arma 3: Actions · doGetOut · commandGetOut · leaveVehicle · moveInDriver · moveInGunner · moveInCommander · moveInTurret · moveInCargo · isTurnedOut

Community notes

.kju

This seems no longer true in Arma 3:

Does not work on dead crew - Use setPos family of commands to move dead units out soon after they became dead. After awhile dead unit's group becomes grpNull and it cannot be moved out at all.