{"name":"combatMode","operator":null,"title":"combatMode","type":"command","url":"https://community.bistudio.com/wiki/combatMode","revid":364813,"updated":"2024-06-16T08:46:50Z","groups":["Groups","AI Behaviour"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the combat mode of the given AI group. See setCombatMode for more information about combat modes.","syntaxes":[{"syntax":"combatMode group","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"One of","optional":false,"default":null,"description":"One of\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used.","types":[],"since":null,"text":"group: One of\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used."}],"returns":{"type":"String","types":["String"],"description":"one of: - \"BLUE\" - \"GREEN\" - \"WHITE\" - \"YELLOW\" - \"RED\" - \"ERROR\"","text":"String - one of:\n- \"BLUE\"\n- \"GREEN\"\n- \"WHITE\"\n- \"YELLOW\"\n- \"RED\"\n- \"ERROR\""},"form":"unary","operator":null,"left":null,"right":{"text":"group","types":[]}}],"examples":[{"text":"```sqf\nif (combatMode _grp1 == \"BLUE\") then {_grp1 setCombatMode \"GREEN\"};\n```","code":["if (combatMode _grp1 == \"BLUE\") then {_grp1 setCombatMode \"GREEN\"};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Combat Modes","setCombatMode","behaviour","setBehaviour","skill","setSkill","Arma 3: AI Skill","setUnitCombatMode","unitCombatMode","setCombatBehaviour","combatBehaviour"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: AI Behaviour","Command Group: Groups","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}