fullCrew: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) (removed note as it is now explained in detain ion description) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.|= Description | |Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.<br><br> | ||
'''NOTE''' that with introduction of person turrets, the cargo indexes listed in the return are true for [[moveInCargo]] command but incompatible with [[action]]s such as "GetInCargo" and "MoveInCargo". To find out seats compatible with cargo action commands, execute command with "cargo" filter: | |||
<code>[[fullCrew]] [_veh, "cargo", [[true]]];</code> | |||
The return array is ordered according to cargo index compatible with action cargo commands, i.e. 1st element has index 0, second - index 1, etc. For example WY-55 Hellcat reports: | |||
* <tt>[[<NULL-object>,"cargo",2,[],false],[<NULL-object>,"cargo",3,[],false],[<NULL-object>,"cargo",4,[],false],[<NULL-object>,"cargo",5,[],false]]</tt> | |||
for cargo positions. The following commands will put player in the same seat: | |||
<code>[[player]] [[moveInCargo]] [heli, 2]; | |||
[[player]] [[action]] ["GetInCargo", heli, 0];</code>|= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|'''fullCrew''' vehicle|= Syntax | |'''fullCrew''' vehicle|= Syntax | ||
|p1 = vehicle: [[Object]] | |p1 = vehicle: [[Object]] | ||
| [[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 (see note in description),<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|s2='''fullCrew''' [vehicle, type, includeEmpty]|= Syntax | |s2='''fullCrew''' [vehicle, type, includeEmpty]|= Syntax | ||
Line 19: | Line 26: | ||
|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|= | |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 (see note in description),<[[Array]]>turretPath,<[[Boolean]]>personTurret], ...] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1 = <code>_list = [[fullCrew]] [[vehicle]] [[player]];</code> |= Example1 | |x1 = <code>_list = [[fullCrew]] [[vehicle]] [[player]];</code> |= Example1 | ||
Line 45: | Line 52: | ||
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"<br> | 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"<br> | ||
The filter is not case sensitive. | The filter is not case sensitive. | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 14:24, 8 March 2017
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.
NOTE that with introduction of person turrets, the cargo indexes listed in the return are true for moveInCargo command but incompatible with actions such as "GetInCargo" and "MoveInCargo". To find out seats compatible with cargo action commands, execute command with "cargo" filter:fullCrew [_veh, "cargo", true];
The return array is ordered according to cargo index compatible with action cargo commands, i.e. 1st element has index 0, second - index 1, etc. For example WY-55 Hellcat reports:- [[<NULL-object>,"cargo",2,[],false],[<NULL-object>,"cargo",3,[],false],[<NULL-object>,"cargo",4,[],false],[<NULL-object>,"cargo",5,[],false]]
player moveInCargo [heli, 2]; player action ["GetInCargo", heli, 0];
- Groups:
- Uncategorised
Syntax
- Syntax:
- fullCrew vehicle
- Parameters:
- vehicle: Object
- Return Value:
- Array - format [[<Object>unit,<String>role,<Number>cargoIndex (see note in description),<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 (see note in description),<Array>turretPath,<Boolean>personTurret], ...]
Examples
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
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.