{"name":"isSwitchingWeapon","operator":null,"title":"isSwitchingWeapon","type":"command","url":"https://community.bistudio.com/wiki/isSwitchingWeapon","revid":376101,"updated":"2025-08-20T14:10:18Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.20"}],"since":{"game":"arma3","name":"Arma 3","version":"2.20"},"arma3_since":"2.20","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns wether or not the unit is in the process of switching weapon.","syntaxes":[{"syntax":"isSwitchingWeapon unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if the unit is switching weapon.","text":"Boolean - true if the unit is switching weapon."},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nisSwitchingWeapon player;\n```","code":["isSwitchingWeapon player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["primaryWeaponMagazine","primaryWeaponItems","addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","secondaryWeapon","handgunWeapon","currentWeapon","weapons","primaryWeapon","setUnitLoadout"],"notes":[{"user":"OverlordZorn","date":"2025-08-20T14:10:18Z","text":"as of 2.20, this does not return true when the unit is prone"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Arma 3 version 2.20","Scripting Commands"]}