emptyPositions: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
(67 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |game1= arma1 | ||
|version1= 1.00 | |||
| | |game2= arma2 | ||
|version2= 1.00 | |||
| | |game3= arma2oa | ||
|version3= 1.50 | |||
| | |game4= tkoh | ||
|version4= 1.00 | |||
| | |game5= arma3 | ||
|version5= 0.50 | |||
| | |gr1= Object Manipulation | ||
| | |gr2= Unit Control | ||
| | |descr= Returns the number of given empty positions in the vehicle. | ||
{{Feature|informative|To return the actual units in the vehicle use [[fullCrew]]. However if only the number is desired, use [[emptyPositions]] because it is faster.}} | |||
|s1= vehicle [[emptyPositions]] position | |||
|p1= vehicle: [[Object]] | |||
|p2= position: [[String]] - can be one of: | |||
{{Columns|2| | |||
* {{hl|"Commander"}} | |||
* {{hl|"Driver"}} | |||
* {{hl|"Gunner"}} | |||
* {{hl|"Cargo"}} - all cargo positions, FFV or not | |||
* {{GVI|arma3|2.10|size= 0.75}} {{hl|""}} - all empty positions | |||
* {{GVI|arma3|2.10|size= 0.75}} {{hl|"CargoNoFFV"}} - non-FFV cargo | |||
* {{GVI|arma3|2.10|size= 0.75}} {{hl|"CargoFFV"}} - FFV cargo | |||
* {{GVI|arma3|2.14|size= 0.75}} {{hl|"Turret"}} - empty turrets (no FFV turrets, they are included in "CargoFFV") | |||
}} | }} | ||
|r1= [[Number]] | |||
< | |x1= <sqf>_freeCargoAndFFVPositions = vehicle player emptyPositions "Cargo";</sqf> | ||
</ | |||
< | |x2= <sqf>_freeCargoOnlyPositions = vehicle player emptyPositions "CargoNoFFV";</sqf> | ||
[[ | |seealso= [[moveInDriver]] [[moveInTurret]] [[moveInCommander]] [[moveInGunner]] [[moveInCargo]] [[getCargoIndex]] | ||
[[ | }} | ||
{{Note | |||
|user= DreadedEntity | |||
|timestamp= 20220320000854 | |||
|text= '''emptyPositions''' combines both turret and cargo in its output. If you must know the true count of either, you will have to use [[fullCrew]] (tested on several vehicles) | |||
<br>I have not found a way to test for copilot in helicopters | |||
}} |
Latest revision as of 19:16, 12 February 2023
Description
- Description:
- Returns the number of given empty positions in the vehicle.
- Groups:
- Object ManipulationUnit Control
Syntax
- Syntax:
- vehicle emptyPositions position
- Parameters:
- vehicle: Object
- position: String - can be one of:
- Return Value:
- Number
Examples
- Example 1:
- Example 2:
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
- Posted on Mar 20, 2022 - 00:08 (UTC)
-
emptyPositions combines both turret and cargo in its output. If you must know the true count of either, you will have to use fullCrew (tested on several vehicles)
I have not found a way to test for copilot in helicopters
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Object Manipulation
- Command Group: Unit Control