fullCrew: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 16: | Line 16: | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
|r1= [[Array]] - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret]: | |r1= [[Array]] - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit]: | ||
* unit: [[Object]] | * unit: [[Object]] | ||
* role: [[String]] - not always lowercase (from 2.03 always lower case) | * role: [[String]] - not always lowercase (from 2.03 always lower case) | ||
Line 22: | Line 22: | ||
* turretPath: [[Array]] | * turretPath: [[Array]] | ||
* personTurret: [[Boolean]] | * personTurret: [[Boolean]] | ||
* {{GVI|arma3|2.12}} assignedUnit: [[Object]] | |||
|s2= [[fullCrew]] [vehicle, type, includeEmpty] | |s2= [[fullCrew]] [vehicle, type, includeEmpty] | ||
Line 37: | Line 38: | ||
|p23since= arma3 1.56 | |p23since= arma3 1.56 | ||
|r2= [[Array]] - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret]: | |r2= [[Array]] - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit]: | ||
* unit: [[Object]] | * unit: [[Object]] | ||
* role: [[String]] - not always lowercase (from 2.03 always lower case) | * role: [[String]] - not always lowercase (from 2.03 always lower case) | ||
Line 43: | Line 44: | ||
* turretPath: [[Array]] | * turretPath: [[Array]] | ||
* personTurret: [[Boolean]] | * personTurret: [[Boolean]] | ||
* {{GVI|arma3|2.12}} assignedUnit: [[Object]] | |||
|x1= <sqf>_list = fullCrew vehicle player;</sqf> | |x1= <sqf>_list = fullCrew vehicle player;</sqf> |
Revision as of 16:01, 31 August 2022
Description
- Description:
- Returns an array with all crew inside given vehicle, with or without empty seats.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- fullCrew vehicle
- Parameters:
- vehicle: Object
- Return Value:
- Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit]:
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"
- since 1.56
- includeEmpty: Boolean - (Optional, default false) include empty crew seats
- Return Value:
- Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit]:
Examples
- Example 1:
- Example 2:
- 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
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