Description
Returns an array with all crew inside given vehicle, with or without empty seats.
Important
With the introduction of person turrets (FFV), the returned cargoIndex works with moveInCargo but does not with actions such as "GetInCargo" and "MoveToCargo". To find out indexes for actions, use the "cargo" filter (See #Example 3).
Syntax
Syntax 1
fullCrew vehicle
Parameters:
vehicle: Object
Returns: Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:
- unit: Object
- role: String - not always lowercase before Arma 3 v2.04
- cargoIndex: Number
- turretPath: Turret Path
- personTurret: Boolean
- Arma 3 v2.12 assignedUnit: Object - see assignAsXXX commands, assignAsDriver for example
- Arma 3 v2.12 positionName: String - unlocalized entry for turret's
gunnerName, for example "$STR_A3_TURRETS_CARGOTURRET_R2"
Syntax 2
fullCrew [vehicle, type, includeEmpty]
Parameters:
vehicle: Objecttype: String - role filter (case-insensitive). An invalid value (e.g "") will return all positions. Available values:- "driver"
- "commander"
- "gunner"
- "turret"
- "cargo"
includeEmpty: Boolean - (Optional, default false) include empty crew seats (since arma3 1.56)
Returns: Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:
- unit: Object
- role: String - not always lowercase before Arma 3 v2.04
- cargoIndex: Number
- turretPath: Turret Path
- personTurret: Boolean
- Arma 3 v2.12 assignedUnit: Object - see assignAsXXX commands, assignAsDriver for example
- Arma 3 v2.12 positionName: String - unlocalized entry for turret's
gunnerName, for example "$STR_A3_TURRETS_CARGOTURRET_R2"
Examples
Example 1
_list = fullCrew vehicle player;
/*
returns for example (on an armed WY-55 Hellcat):
[
[R Alpha 1-1:1, "driver", -1, [], false, R Alpha 1-1:1, "$STR_POSITION_DRIVER"],
[R Alpha 1-1:2, "turret", -1, [0], false, R Alpha 1-1:2, "$STR_A3_COPILOT"]
]
*/
Example 2
_list = fullCrew [vehicle player, "turret"];
/*
returns for example (on an armed WY-55 Hellcat):
[
[R Alpha 1-1:2, "turret", -1, [0], false, R Alpha 1-1:2, "$STR_A3_COPILOT"]
]
*/
Example 3
private _actionCompatibleCargoIndexes = fullCrew [heli, "cargo", true];
/*
returns for example (on an empty armed WY-55 Hellcat):
[
[objNull, "cargo", 2, [], false, objNull, "$STR_GETIN_POS_PASSENGER"],
[objNull, "cargo", 3, [], false, objNull, "$STR_GETIN_POS_PASSENGER"],
[objNull, "cargo", 4, [], false, objNull, "$STR_GETIN_POS_PASSENGER"],
[objNull, "cargo", 5, [], false, objNull, "$STR_GETIN_POS_PASSENGER"]
]
using the element's index is compatible with action cargo commands - see below
*/
// the following commands will put the player in the same seat:
player moveInCargo [heli, 2];
player action ["GetInCargo", heli, 0];
See also
crew · createVehicleCrew · assignedVehicleRole · allTurrets · emptyPositions