fullCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|1.34|Game version=
|1.34


|arg= global|Multiplayer Arguments=
|arg= global


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


| Returns an array with all crew inside given vehicle, with or without empty seats.
| 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 [[action]]s such as "GetInCargo" and "MoveToCargo". To find out indexes for actions, use the "cargo" filter (See [[#Examples|Example 3]]).}} |DESCRIPTION=
{{Important | With the introduction of person turrets (FFV), the returned ''cargoIndex'' works with [[moveInCargo]] but does not with [[action]]s such as "GetInCargo" and "MoveToCargo". To find out indexes for actions, use the "cargo" filter (See [[#Examples|Example 3]]).}}


| [[fullCrew]] vehicle |SYNTAX=
| [[fullCrew]] vehicle


|p1 = vehicle: [[Object]]
|p1 = vehicle: [[Object]]
Line 22: Line 22:
* cargoIndex: [[Number]]
* cargoIndex: [[Number]]
* turretPath: [[Array]]
* turretPath: [[Array]]
* personTurret: [[Boolean]] |RETURNVALUE=
* personTurret: [[Boolean]]


|s2= [[fullCrew]] [vehicle, type, includeEmpty] |SYNTAX2=
|s2= [[fullCrew]] [vehicle, type, includeEmpty]


|p21= vehicle: [[Object]]
|p21= vehicle: [[Object]]
Line 42: Line 42:
* cargoIndex: [[Number]]
* cargoIndex: [[Number]]
* turretPath: [[Array]]
* turretPath: [[Array]]
* personTurret: [[Boolean]] |RETURNVALUE2=
* personTurret: [[Boolean]]


|x1= <code>_list = [[fullCrew]] [[vehicle]] [[player]];</code> |EXAMPLE1=
|x1= <code>_list = [[fullCrew]] [[vehicle]] [[player]];</code>


|x2= <code>_list = [[fullCrew]] [<nowiki/>[[vehicle]] [[player]], "turret"];</code> |EXAMPLE2=
|x2= <code>_list = [[fullCrew]] [<nowiki/>[[vehicle]] [[player]], "turret"];</code>


|x3= <code>[[private]] _actionCompatibleCargoIndexes = [[fullCrew]] [heli, "cargo", [[true]]];
|x3= <code>[[private]] _actionCompatibleCargoIndexes = [[fullCrew]] [heli, "cargo", [[true]]];
Line 63: Line 63:
[[player]] [[moveInCargo]] [heli, 2];
[[player]] [[moveInCargo]] [heli, 2];
[[player]] [[action]] ["GetInCargo", heli, 0];
[[player]] [[action]] ["GetInCargo", heli, 0];
</code> |EXAMPLE3=
</code>


| [[crew]], [[createVehicleCrew]], [[assignedVehicleRole]], [[allTurrets]] |SEEALSO=
| [[crew]], [[createVehicleCrew]], [[assignedVehicleRole]], [[allTurrets]]
}}
}}



Revision as of 00:36, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns an array with all crew inside given vehicle, with or without empty seats.
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).
Groups:
Object Manipulation

Syntax

Syntax:
fullCrew vehicle
Parameters:
vehicle: Object
Return Value:
Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret]:

Alternative Syntax

Syntax:
fullCrew [vehicle, type, includeEmpty]
Parameters:
vehicle: Object
type: String - role filter (case-insensitive). An invalid value (e.g "") will return all positions. Available values:
  • "driver"
  • "commander"
  • "gunner"
  • "turret"
  • "cargo"
Arma 3 logo black.png1.56 includeEmpty: Boolean - (Optional, default false) include empty crew seats Template:Since
Return Value:
Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret]:

Examples

Example 1:
_list = fullCrew vehicle player;
Example 2:
_list = fullCrew [vehicle player, "turret"];
Example 3:
private _actionCompatibleCargoIndexes = fullCrew [heli, "cargo", true]; /* returns for example (on an armed WY-55 Hellcat): [ [objNull, "cargo" ,2, [], false], [objNull, "cargo", 3, [], false], [objNull, "cargo", 4, [], false], [objNull, "cargo", 5, [], false] ] 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];

Additional Information

See also:
crewcreateVehicleCrewassignedVehicleRoleallTurrets

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section