---
name: "setCombatBehaviour"
type: command
status: ok
groups: ["AI Behaviour", "Groups"]
arma3_since: "2.04"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setCombatBehaviour
revid: 321904
updated: 2022-05-22T11:02:37Z
---

# setCombatBehaviour

*Command · AI Behaviour, Groups · Arma 3 v2.04*

Locality: arguments **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](../topics/Group.md) entity and not a simple collection of units. To retrieve unit or group behaviour see [combatBehaviour](../commands/combatBehaviour.md). The behaviour is one of:
- "CARELESS"
- "SAFE"
- "AWARE"
- "COMBAT"
- "STEALTH"

> [!NOTE]
> See AI Behaviour for details of the effect of this command on AI units. Group behaviour usually is "CARELESS" or "SAFE"

| Command | Applies To |
|---|---|
| [setBehaviour](../commands/setBehaviour.md) | **Every unit** in the group, but **not the group** itself |
| [setBehaviourStrong](../commands/setBehaviourStrong.md) | **Every unit** in the group, and the **group** itself |
| [setCombatBehaviour](../commands/setCombatBehaviour.md) | If argument is [Object](../topics/Object.md), only that **unit**, and if argument is [Group](../topics/Group.md), the **group** itself (not its units) |

## Syntax

### Syntax 1

```sqf
unit setCombatBehaviour behaviour
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - AI unit
- `behaviour`: [String](../topics/String.md) - see description

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
group setCombatBehaviour behaviour
```

**Parameters:**

- `group`: [Group](../topics/Group.md) - AI group
- `behaviour`: [String](../topics/String.md) - see description

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
unit1 setCombatBehaviour "SAFE";
```

### Example 2

```sqf
group1 setCombatBehaviour "CARELESS";
```

## See also

AIBehaviour · [combatBehaviour](../commands/combatBehaviour.md) · [behaviour](../commands/behaviour.md) · [setBehaviour](../commands/setBehaviour.md) · [setBehaviourStrong](../commands/setBehaviourStrong.md) · [setWaypointBehaviour](../commands/setWaypointBehaviour.md) · [combatMode](../commands/combatMode.md) · [setCombatMode](../commands/setCombatMode.md) · [skill](../commands/skill.md) · [setSkill](../commands/setSkill.md)

<sub>Source: [BI Community Wiki — setCombatBehaviour](https://community.bistudio.com/wiki/setCombatBehaviour) (revision 321904).</sub>
