switchableUnits: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|eff= local | |eff= local | ||
|gr1= Multiplayer | |gr1= Multiplayer | ||
|gr2= Team Switch | |gr2= Team Switch | ||
|gr3= Object Detection | |gr3= Object Detection | ||
| Returns a list of playable units available for switching to. | | Returns a list of playable units available for switching to. | ||
Line 18: | Line 18: | ||
Dead and player-controlled units are automatically removed from the resulting array.<br><br> | Dead and player-controlled units are automatically removed from the resulting array.<br><br> | ||
{{Informative | In Multiplayer, [[switchableUnits]] are only available when [[description.ext#respawn|respawn]] type is set to SIDE or GROUP, the mission contains units marked playable and [[player]] is able to switch to any of those units. }}<br> | {{Informative | In Multiplayer, [[switchableUnits]] are only available when [[description.ext#respawn|respawn]] type is set to SIDE or GROUP, the mission contains units marked playable and [[player]] is able to switch to any of those units. }}<br> | ||
In order to get all ''playable'' units regardless of their [[side]], see the [[playableUnits]] command. | In order to get all ''playable'' units regardless of their [[side]], see the [[playableUnits]] command. | ||
| [[switchableUnits]] | | [[switchableUnits]] | ||
| [[Array]] | | [[Array]] | ||
|x1= _availableUnits = [[switchableUnits]]; | |x1= _availableUnits = [[switchableUnits]]; | ||
| [[allPlayers]], [[units]], [[allCurators]], [[allGroups]], [[allDead]], [[playableUnits]], [[vehicles]], [[allUnitsUAV]], [[allDeadMen]], [[teamSwitch]], [[Team_Switch]] | | [[allPlayers]], [[units]], [[allCurators]], [[allGroups]], [[allDead]], [[playableUnits]], [[vehicles]], [[allUnitsUAV]], [[allDeadMen]], [[teamSwitch]], [[Team_Switch]] | ||
}} | }} | ||
Revision as of 11:26, 18 January 2021
Description
- Description:
- Returns a list of playable units available for switching to.
Command is relative to the client on which it is executed and will only show playable units for the same side as player's group + player himself,
unless in singleplayer where playable units from all sides will be accessible via this command.
Dead and player-controlled units are automatically removed from the resulting array.
In order to get all playable units regardless of their side, see the playableUnits command. - Groups:
- MultiplayerTeam SwitchObject Detection
Syntax
- Syntax:
- switchableUnits
- Return Value:
- Array
Examples
- Example 1:
- _availableUnits = switchableUnits;
Additional Information
- See also:
- allPlayersunitsallCuratorsallGroupsallDeadplayableUnitsvehiclesallUnitsUAVallDeadMenteamSwitchTeam_Switch
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
Notes
- Posted on July 06, 2011 - 13:32
- Messiah2
- On dedicated server this command returns empty array.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Command Group: Multiplayer
- Command Group: Team Switch
- Command Group: Object Detection
- Scripting Commands: Local Effect
- Arma 2: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands