Arma 3 Scripting

Command in Turrets

allTurrets

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

Description

Returns array of available turret paths from vehicle object.

Note

Syntax

Syntax 1

allTurrets vehicle

Parameters:

Returns: Array of Turret Paths

Syntax 2

allTurrets [vehicle, includeFFV]

Parameters:

Returns: Array of Turret Paths

Examples

Example 1

_turretPaths = allTurrets _mySlammerUP;                // [[0],[0,0]]
_turretPaths = allTurrets [_mySlammerUP, true];        // [[0],[0,0]] <- commander turret is also an FFV turret
_turretPaths = allTurrets [_mySlammerUP, false];    // [[0]]

Example 2

Return FFV turrets only:

_FFVTurrets = allTurrets [tank, true] - allTurrets [tank, false];

See also

moveInTurret · enablePersonTurret · assignedVehicleRole · fullCrew · turretUnit · turretLocal · turretOwner · BIS_fnc_allTurrets · BIS_fnc_turretConfig

Community notes

AgentRev

The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.

Also, the driver turret [-1] is never included in the results, which can be solved as follows:

_paths = [[-1]] + allTurrets _vehicle;