{"name":"switchableUnits","operator":null,"title":"switchableUnits","type":"command","url":"https://community.bistudio.com/wiki/switchableUnits","revid":376986,"updated":"2026-01-01T07:13:49Z","groups":["Multiplayer","Team Switch","Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"description":"Returns a list of playable units available for switching to\n- 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\n- In singleplayer where playable units from all sides will be accessible via this command\n- Dead and player-controlled units are automatically removed from the resulting array\n- In order to get all *playable* units regardless of their side, see the playableUnits command","syntaxes":[{"syntax":"switchableUnits","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Array of Objects","types":["Array","Object"],"description":null,"text":"Array of Objects"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\n_availableUnits = switchableUnits;\n```","code":["_availableUnits = switchableUnits;"]}],"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,.","problems":null,"aliases":[],"see_also":["Team Switch","playableUnits","allPlayers","teamSwitch"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Command Group: Object Detection","Command Group: Team Switch","Introduced with Armed Assault version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}