switchableUnits: Difference between revisions
Jump to navigation
Jump to search
m (see also) |
Lou Montana (talk | contribs) m (Text replacement - "<code>_([a-zA-Z0-9_]+) = \[\[([a-zA-Z0-9]+)\]\];?<\/code>" to "<sqf>_$1 = $2;</sqf>") |
||
(38 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |game1= arma1 | ||
|version1= 1.00 | |||
|1.00 | |game2= arma2 | ||
|version2= 1.00 | |||
| | |game3= arma2oa | ||
|version3= 1.50 | |||
| | |game4= tkoh | ||
|version4= 1.00 | |||
| | |game5= arma3 | ||
|version5= 0.50 | |||
| | |eff= local | ||
|gr1= Multiplayer | |||
|gr2= Team Switch | |||
|gr3= Object Detection | |||
|descr= 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 | |||
* 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 | |||
|mp= 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. On dedicated servers, this command returns an empty array,. | |||
|s1= [[switchableUnits]] | |||
|r1= [[Array]] | |||
|x1= <sqf>_availableUnits = switchableUnits;</sqf> | |||
< | |||
</ | |||
|seealso= [[Team Switch]] [[playableUnits]] [[allPlayers]] [[teamSwitch]] | |||
[[ | }} | ||
[[ | |||
[[ | |||
[[ | |||
Latest revision as of 21:21, 7 May 2022
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
- 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
- Multiplayer:
- In Multiplayer, switchableUnits are only available when 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. On dedicated servers, this command returns an empty array,.
- Groups:
- MultiplayerTeam SwitchObject Detection
Syntax
- Syntax:
- switchableUnits
- Return Value:
- Array
Examples
- Example 1:
Additional Information
- See also:
- Team Switch playableUnits allPlayers teamSwitch
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
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: Multiplayer
- Command Group: Team Switch
- Command Group: Object Detection
- Scripting Commands: Local Effect