Arma 3 Scripting

Command in Object Manipulation, Unit Control

emptyPositions

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

Description

Returns the number of given empty positions in the vehicle.

Note

To return the actual units in the vehicle use fullCrew. However if only the number is desired, use emptyPositions because it is faster.

Syntax

Syntax 1

vehicle emptyPositions position

Parameters:

Returns: Number - the number of available positions ignoring locked positions

Syntax 2

since arma3 2.22

vehicle emptyPositions [position, ignoreLocked]

Parameters:

Returns: Number - the number of available positions ignoring locked positions

Examples

Example 1

_freeCargoAndFFVPositions = vehicle player emptyPositions "Cargo";

Example 2

_freeCargoOnlyPositions = vehicle player emptyPositions "CargoNoFFV";

See also

moveInDriver · moveInTurret · moveInCommander · moveInGunner · moveInCargo · getCargoIndex · moveInAny

Community notes

DreadedEntity

emptyPositions combines both turret and cargo in its output. If you must know the true count of either, you will have to use fullCrew (tested on several vehicles)

I have not found a way to test for copilot in helicopters