Arma 3 Scripting

moveInAny

  • Global argument
  • Global effect
  • Arma 3 v1.18

Command · Markdown · JSON · original wiki page

Description

Moves unit to the first available seat in the specified vehicle.

The order of priorities is the same order used in squad command when you order subordinates to get in vehicle to any position and is the same order used in Zeus when you drag units to a vehicle.

Seat assignment seems to use the following priority logic:

driver (moveInDriver) → commander (moveInCommander) → gunner (moveInGunner) → turrets (moveInTurret) → cargo (moveInCargo).

Important

If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.

Note

This command will move player into the locked vehicle or seat just as well.

Syntax

Syntax 1

unit moveInAny vehicle

Parameters:

Returns: Boolean - true on success, false on failure

Syntax 2

since arma3 2.22

unit moveInAny [vehicle, positions, ignoreLocked]

Parameters:

Returns: Boolean - true on success, false on failure

Examples

Example 1

player moveInAny tank;

Example 2

player moveInAny [tank, ["CARGO", "TURRET"]]; // checks free cargo position, if not available, checks free turret next

See also

moveInDriver · moveInCommander · moveInGunner · moveInTurret · moveInCargo · emptyPositions