{"name":"setUnitCombatMode","title":"setUnitCombatMode","type":"command","url":"https://community.bistudio.com/wiki/setUnitCombatMode","revid":322932,"updated":"2022-06-28T21:42:41Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets **unit's** combat mode (engagement rules). For AI group combat mode see setCombatMode. Mode may be one of the following:\n\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\n\nSee Combat Modes for more information on combat modes.","syntaxes":[{"syntax":"unit setUnitCombatMode mode","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mode"}}],"examples":[{"code":["_unit setUnitCombatMode \"YELLOW\";"]}],"see_also":["unitCombatMode","setCombatMode","combatMode"]}