{"name":"setUnitCombatMode","operator":null,"title":"setUnitCombatMode","type":"command","url":"https://community.bistudio.com/wiki/setUnitCombatMode","revid":322932,"updated":"2022-06-28T21:42:41Z","groups":["AI Behaviour"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.02"}],"since":{"game":"arma3","name":"Arma 3","version":"2.02"},"arma3_since":"2.02","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets **unit's** combat mode (engagement rules). For AI group combat mode see setCombatMode. Mode may be one of the following:\n- `\"BLUE\"` : Never fire, keep formation\n- `\"GREEN\"` : Hold fire, keep formation\n- `\"WHITE\"` : Hold fire, engage at will/loose formation\n- `\"YELLOW\"` : Fire at will, keep formation\n- `\"RED\"` : Fire at will, engage at will/loose formation\nSee Combat Modes for more information on combat modes.","syntaxes":[{"syntax":"unit setUnitCombatMode mode","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"mode","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"mode: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"mode","types":["String"]}}],"examples":[{"text":"```sqf\n_unit setUnitCombatMode \"YELLOW\";\n```","code":["_unit setUnitCombatMode \"YELLOW\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["unitCombatMode","setCombatMode","combatMode"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: AI Behaviour","Introduced with Arma 3 version 2.02","Scripting Commands"]}