{"name":"combatMode","title":"combatMode","type":"command","url":"https://community.bistudio.com/wiki/combatMode","revid":379285,"updated":"2026-10-30T23:46:10Z","groups":["Groups","AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the combat mode of the given AI group. See setCombatMode for more information about combat modes.","syntaxes":[{"syntax":"combatMode group","params":[{"name":"group","type":"Group or Object","description":"Group or Object\n\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used.","type_expr":"Group | Object","text":"group: Group or Object\n\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used."}],"returns":{"type":"String","type_expr":"String","description":"one of:\n- \"BLUE\" - \"GREEN\" - \"WHITE\" - \"YELLOW\" - \"RED\" - \"ERROR\"","text":"String - one of:\n\n- \"BLUE\"\n- \"GREEN\"\n- \"WHITE\"\n- \"YELLOW\"\n- \"RED\"\n- \"ERROR\""},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["if (combatMode _grp1 == \"BLUE\") then {_grp1 setCombatMode \"GREEN\"};"]}],"see_also":["Combat Modes","setCombatMode","behaviour","setBehaviour","skill","setSkill","Arma 3: AI Skill","setUnitCombatMode","unitCombatMode","setCombatBehaviour","combatBehaviour"],"notes":[{"user":"Ceeeb","text":"In **OFP v1.96**, combatMode return value does not change when unit's combat mode is set with radio commands, i.e troops under the player's command."}]}