---
name: "BIS_fnc_ambientAnimCombat"
type: function
status: ok
groups: ["Ambient"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_ambientAnimCombat
revid: 349315
updated: 2023-11-08T14:52:25Z
---

# BIS_fnc_ambientAnimCombat

*Function · Ambient · Arma 3 v1.00*

## Description

Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away.

> [!NOTE]
> Animations can be cancelled using `_unit call BIS_fnc_ambientAnim__terminate`.

## Syntax

```sqf
[unit, animationSet, equipmentLevel, condition, behaviour] call BIS_fnc_ambientAnimCombat
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - unit where the animations will be played
- `animationSet`: [String](../topics/String.md) - (Optional, default "STAND") the animation set to play. Possible values are:
  - "STAND"
  - "STAND_IA"
  - "SIT_LOW"
  - "KNEEL"
  - "LEAN"
  - "WATCH"
  - "WATCH1"
  - "WATCH2"
- `equipmentLevel`: [String](../topics/String.md) - (Optional, default "RANDOM") the equipment level of the unit. Possible values are:
  - "NONE"
  - "LIGHT"
  - "MEDIUM"
  - "FULL"
  - "ASIS"
  - "RANDOM"
- `condition`: [Code](../topics/Code.md) or [String](../topics/String.md) - (Optional, default `{ false }`) condition that if true frees the unit from the animation loop
- `behaviour`: [String](../topics/String.md) - (Optional, default "COMBAT") behaviour the unit should go to, when freed. Default "COMBAT"

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

## Examples

### Example 1

```sqf
[_unit, "STAND", "FULL", { (player distance _this) < 5 }] call BIS_fnc_ambientAnimCombat;
```

## See also

[BIS_fnc_ambientAnim](../functions/BIS_fnc_ambientAnim.md)

<sub>Source: [BI Community Wiki — BIS fnc ambientAnimCombat](https://community.bistudio.com/wiki/BIS_fnc_ambientAnimCombat) (revision 349315).</sub>
