emptyPositions: Difference between revisions

From Bohemia Interactive Community
m (Add positions back)
No edit summary
Line 38: Line 38:


|seealso= [[moveInDriver]] [[moveInTurret]] [[moveInCommander]] [[moveInGunner]] [[moveInCargo]] [[getCargoIndex]]
|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
}}
}}

Revision as of 02:08, 20 March 2022

Hover & click on the images for description

Description

Description:
Returns the number of given 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"
Return Value:
Number

Examples

Example 1:
_freeCargoPositions = vehicle player emptyPositions "cargo";

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.
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