emptyPositions: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
No edit summary
 
(49 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Returns the number of given positions in the vehicle.
|game3= arma2oa
|version3= 1.50


Positions can be ''"Commander", "Driver", "Gunner"'' or ''"Cargo"'' |DESCRIPTION=
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


| [[Number]] <nowiki>=</nowiki> vehicle '''emptyPositions ''' position |SYNTAX=
|game5= arma3
|version5= 0.50


|p1= vehicle: [[Object]] |PARAMETER1=
|gr1= Object Manipulation


|p2= position: [[String]] |PARAMETER2=
|gr2= Unit Control


| [[Number]] |RETURNVALUE=
|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.}}
 
|x1= <code>_freeCargoPositions = [[vehicle]] [[player]] [[emptyPositions]] "cargo";</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[moveInDriver]], [[moveInTurret]], [[moveInCommander]], [[moveInGunner]], [[moveInCargo]], [[getCargoIndex]]|SEEALSO=
|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")
}}
}}


<h3 style="display:none">Notes</h3>
|r1= [[Number]]
<dl class="command_description">
 
<!-- Note Section BEGIN -->
|x1= <sqf>_freeCargoAndFFVPositions = vehicle player emptyPositions "Cargo";</sqf>


<!-- Note Section END -->
|x2= <sqf>_freeCargoOnlyPositions = vehicle player emptyPositions "CargoNoFFV";</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[moveInDriver]] [[moveInTurret]] [[moveInCommander]] [[moveInGunner]] [[moveInCargo]] [[getCargoIndex]]
}}


[[Category:Scripting Commands|EMPTYPOSITIONS]]
{{Note
[[Category:Scripting Commands ArmA|EMPTYPOSITIONS]]
|user= DreadedEntity
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
|timestamp= 20220320000854
[[Category:Command_Group:_Vehicle_Assignment|{{uc:{{PAGENAME}}}}]]
|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)
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
<br>I have not found a way to test for copilot in helicopters
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:16, 12 February 2023

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" - all cargo positions, FFV or not
  • Arma 3 logo black.png2.10 "" - all empty positions
  • Arma 3 logo black.png2.10 "CargoNoFFV" - non-FFV cargo
  • Arma 3 logo black.png2.10 "CargoFFV" - FFV cargo
  • Arma 3 logo black.png2.14 "Turret" - empty turrets (no FFV turrets, they are included in "CargoFFV")
Return Value:
Number

Examples

Example 1:
_freeCargoAndFFVPositions = vehicle player emptyPositions "Cargo";
Example 2:
_freeCargoOnlyPositions = vehicle player emptyPositions "CargoNoFFV";

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