---
name: "combatMode"
type: command
status: ok
groups: ["Groups", "AI Behaviour"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/combatMode
revid: 364813
updated: 2024-06-16T08:46:50Z
---

# combatMode

*Command · Groups, AI Behaviour · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **global**

## Description

Returns the combat mode of the given AI [group](../topics/Group.md). See [setCombatMode](../commands/setCombatMode.md) for more information about combat modes.

## Syntax

```sqf
combatMode group
```

**Parameters:**

- `group`: One of
  - [Group](../topics/Group.md)
  - [Object](../topics/Object.md) of type [Unit](../topics/Object.md) - if the argument is unit [Object](../topics/Object.md), unit's current group is used.

**Returns:** [String](../topics/String.md) - one of:
- "BLUE"
- "GREEN"
- "WHITE"
- "YELLOW"
- "RED"
- "ERROR"

## Examples

### Example 1

```sqf
if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};
```

## See also

Combat Modes · [setCombatMode](../commands/setCombatMode.md) · [behaviour](../commands/behaviour.md) · [setBehaviour](../commands/setBehaviour.md) · [skill](../commands/skill.md) · [setSkill](../commands/setSkill.md) · Arma 3: AI Skill · [setUnitCombatMode](../commands/setUnitCombatMode.md) · [unitCombatMode](../commands/unitCombatMode.md) · [setCombatBehaviour](../commands/setCombatBehaviour.md) · [combatBehaviour](../commands/combatBehaviour.md)

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