emptyPositions: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 49: Line 49:
* {{hl|""}} - all empty position (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)
|p23= filter: [[Boolean]] - [[true]]: Cargo only, [[false]]: FFV only, ommited: Cargo+FFV (Default)


|r2= [[Number]]
|r2= [[Number]]

Revision as of 12:17, 10 April 2022

Hover & click on the images for description

Description

Description:
Returns the number of given empty positions in the vehicle.
To return the actual units in the vehicle use fullCrew. However if only the number is desired, use emptyPositions because it is faster.
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
position: String - can be one of:
  • "Commander"
  • "Driver"
  • "Gunner"
  • "Cargo" - Cargo/FFV/Cargo+FFV (depends on 'filter' value)
  • "" - all empty position (depends on 'filter' value)
filter: Boolean - true: Cargo only, false: FFV only, ommited: Cargo+FFV (Default)
Return Value:
Number

Examples

Example 1:
_freeCargoAndFFVPositions = vehicle player emptyPositions "cargo";
Example 2:
_freeCargoOnlyPositions = vehicle player emptyPositions ["cargo", true];

Additional Information

See also:
moveInDriver moveInTurret moveInCommander moveInGunner moveInCargo getCargoIndex

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
DreadedEntity - c
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