fullCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (global args)
(extended to return empty positions)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


|Returns array with all crew inside given vehicle.|= Description
|Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 14: Line 14:
| [[Array]] - format <nowiki>[[</nowiki><[[Object]]>unit,<[[String]]>role,<[[Number]]>cargoIndex,<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value
| [[Array]] - format <nowiki>[[</nowiki><[[Object]]>unit,<[[String]]>role,<[[Number]]>cargoIndex,<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
|s2='''fullCrew''' [vehicle, type]|= Syntax
|s2='''fullCrew''' [vehicle, type, includeEmpty]|= Syntax
|p21 = [vehicle, type]: [[Array]]
|p21 = [vehicle, type]: [[Array]]|=
|p22 = vehicle: [[Object]]
|p22 = vehicle: [[Object]]|=
|p23 = type: [[String]] - filter (role) available values are "driver", "commander", "gunner", "turret", "cargo"
|p23 = type: [[String]] - filter (role) available values are "driver", "commander", "gunner", "turret", "cargo"|=
|p24 = includeEmpty (Optional): [[Boolean]] - (''since Arma 3 v1.55.133810'') include empty crew seats too|=
|r2= [[Array]] - format <nowiki>[[</nowiki><[[Object]]>unit,<[[String]]>role,<[[Number]]>cargoIndex,<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value
|r2= [[Array]] - format <nowiki>[[</nowiki><[[Object]]>unit,<[[String]]>role,<[[Number]]>cargoIndex,<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 17:29, 5 January 2016

Hover & click on the images for description

Description

Description:
Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.
Groups:
Uncategorised

Syntax

Syntax:
fullCrew vehicle
Parameters:
vehicle: Object
Return Value:
Array - format [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...]

Alternative Syntax

Syntax:
fullCrew [vehicle, type, includeEmpty]
Parameters:
[vehicle, type]: Array
vehicle: Object
type: String - filter (role) available values are "driver", "commander", "gunner", "turret", "cargo"
includeEmpty (Optional): Boolean - (since Arma 3 v1.55.133810) include empty crew seats too
Return Value:
Array - format [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...]

Examples

Example 1:
_list = fullCrew vehicle player;
Example 2:
_list = fullCrew [vehicle player, "turret"];

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

Posted on December 13, 2014 - 22:54 (UTC)
Commy2
Be aware that the returned role may or may not be in lowercase. E.g. it's "driver" for the driver, but "Turret" for turret units.

As of Arma 3 version 1.36, the alternative syntax of this command returns all crew members if the filter is anything except "driver", "commander", "gunner", "turret" or "cargo"
The filter is not case sensitive.