{"name":"switchAction","operator":null,"title":"switchAction","type":"command","url":"https://community.bistudio.com/wiki/switchAction","revid":323082,"updated":"2022-06-28T21:43:13Z","groups":["Unit Control","Animations"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"When used on a person, the given action is started immediately (there is no transition). Use switchmove \"\" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.","syntaxes":[{"syntax":"soldier switchAction action","since":null,"effect":null,"exec":null,"params":[{"name":"soldier","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"soldier: Object"},{"name":"action","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"action: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"soldier","types":["Object"]},"right":{"text":"action","types":["String"]}}],"examples":[{"text":"```sqf\nsoldierOne switchAction \"SitDown\";\n```","code":["soldierOne switchAction \"SitDown\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["playAction","playActionNow","switchMove"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Animations","Command Group: Unit Control","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}