emptyPositions: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "user= *dreadedentity * " to "user= DreadedEntity ") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 31: | Line 31: | ||
* {{hl|"Driver"}} | * {{hl|"Driver"}} | ||
* {{hl|"Gunner"}} | * {{hl|"Gunner"}} | ||
* {{hl|"Cargo"}} | * {{hl|"Cargo"}} - Cargo + FFV | ||
* {{hl|""}} - all empty position (since 2.10) | |||
|r1= [[Number]] | |r1= [[Number]] | ||
|x1= <sqf> | |s2= vehicle [[emptyPositions ]] [position, filter] | ||
|s2since= Arma3 2.10 | |||
|p21= vehicle: [[Object]] | |||
|p22= position: [[String]] - can be one of: | |||
* {{hl|"Commander"}} | |||
* {{hl|"Driver"}} | |||
* {{hl|"Gunner"}} | |||
* {{hl|"Cargo"}} - Cargo/FFV/Cargo+FFV (depends on 'filter' value) | |||
* {{hl|""}} - all empty position (depends on 'filter' value) | |||
|p22= filter: [[Boolean]] - [[true]]: Cargo only, [[false]]: FFV only, ommited: Cargo+FFV (Default) | |||
|r2= [[Number]] | |||
|x1= <sqf>_freeCargoAndFFVPositions = vehicle player emptyPositions "cargo";</sqf> | |||
|x2= <sqf>_freeCargoOnlyPositions = vehicle player emptyPositions ["cargo", true];</sqf> | |||
|seealso= [[moveInDriver]] [[moveInTurret]] [[moveInCommander]] [[moveInGunner]] [[moveInCargo]] [[getCargoIndex]] | |seealso= [[moveInDriver]] [[moveInTurret]] [[moveInCommander]] [[moveInGunner]] [[moveInCargo]] [[getCargoIndex]] |
Revision as of 11:15, 10 April 2022
Description
- Description:
- Returns the number of given positions in the vehicle.
- Groups:
- Object ManipulationUnit Control
Syntax
- Syntax:
- vehicle emptyPositions position
- Parameters:
- vehicle: Object
- position: String - can be one of:
- "Commander"
- "Driver"
- "Gunner"
- "Cargo" - Cargo + FFV
- "" - all empty position (since 2.10)
- Return Value:
- Number
Alternative Syntax
- Syntax:
- vehicle emptyPositions [position, filter]
- Parameters:
- vehicle: Object
- filter: Boolean - true: Cargo only, false: FFV only, ommited: Cargo+FFV (Default)
- 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