{"name":"setCombatBehaviour","title":"setCombatBehaviour","type":"command","url":"https://community.bistudio.com/wiki/setCombatBehaviour","revid":321904,"updated":"2022-05-22T11:02:37Z","groups":["AI Behaviour","Groups"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"local","effect":"global"},"description":"Sets an individual unit entity behaviour (main syntax) or a group entity behaviour (alternative syntax). The group in this case is a Group entity and not a simple collection of units. To retrieve unit or group behaviour see combatBehaviour. The behaviour is one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"\n\n> [!NOTE]\n> See AI Behaviour for details of the effect of this command on AI units. Group behaviour usually is \"CARELESS\" or \"SAFE\"\n\n| Command | Applies To |\n|---|---|\n| setBehaviour | **Every unit** in the group, but **not the group** itself |\n| setBehaviourStrong | **Every unit** in the group, and the **group** itself |\n| setCombatBehaviour | If argument is Object, only that **unit**, and if argument is Group, the **group** itself (not its units) |","syntaxes":[{"syntax":"unit setCombatBehaviour behaviour","params":[{"name":"unit","type":"Object","description":"AI unit","type_expr":"Object"},{"name":"behaviour","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"behaviour"}},{"syntax":"group setCombatBehaviour behaviour","params":[{"name":"group","type":"Group","description":"AI group","type_expr":"Group"},{"name":"behaviour","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"behaviour"}}],"examples":[{"code":["unit1 setCombatBehaviour \"SAFE\";"]},{"code":["group1 setCombatBehaviour \"CARELESS\";"]}],"see_also":["AIBehaviour","combatBehaviour","behaviour","setBehaviour","setBehaviourStrong","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill"]}