switchableUnits

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Armed Assault version 1.00
  Effects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Armed Assault
Version:
1.00

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

In order to get all playable units regardless of their side, see the playableUnits command.

Syntax

Syntax:
switchableUnits
Return Value:
Array

Examples

Example 1:
_availableUnits = switchableUnits;

Additional Information

Multiplayer:
-
See also:
allPlayersunitsallCuratorsallGroupsallDeadplayableUnitsvehiclesallUnitsUAVallDeadMenteamSwitchTeam_Switch

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted on July 06, 2011 - 13:32
Messiah2
On dedicated server this command returns empty array.

Bottom Section