---
name: "allowFleeing"
type: command
status: ok
groups: ["Object Manipulation", "Groups"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/allowFleeing
revid: 310112
updated: 2022-05-05T12:25:24Z
---

# allowFleeing

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

Locality: arguments **local** · effect **global**

## Description

Sets the cowardice level (the lack of courage or bravery) of a group or unit.

Notes:
- Fleeing only affects AI led groups.
- Only the group as a whole can flee (or not).
- The courage of the AI group is based on the group's leader courage subskill.
- Each group has a max strength (summed "armor" of all infantry units - plus armor when inside vehicles).
- If the group losses by injury/damage or death/destruction are higher than the max strength, multiplied by leader's courage or [allowFleeing](../commands/allowFleeing.md) level , then the group will start fleeing.
- As result primarily the AI flees to a nearby "supply point" (some friendly units - preferably with medic or engineer, or a vehicle with repair/ammo/fuel cargo). Alternatively it will try to find a safe position within a 600m radius from the initial waypoint (danger, distance, amount of cover positions are taken into account).
- After the fleeing has been finished the group's initial strength is reset.
- Fleeing units in [combatMode](../commands/combatMode.md) red, will be set to yellow when fleeing to avoid engaging enemies while doing so.
- While fleeing, the group leader will be set to green, to avoid giving engage or fire orders, unless in [combatMode](../commands/combatMode.md) blue already. Also [speedMode](../commands/speedMode.md) is set to full.
- When reaching their flee point/destination, they will change to [combatMode](../commands/combatMode.md) yellow and [speedMode](../commands/speedMode.md) normal.
- With [allowFleeing](../commands/allowFleeing.md) one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.

## Syntax

```sqf
unitOrGroup allowFleeing cowardice
```

**Parameters:**

- `unitOrGroup`: [Object](../topics/Object.md) or [Group](../topics/Group.md)
- `cowardice`: [Number](../topics/Number.md) - 1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together

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

## Examples

### Example 1

```sqf
_group1 allowFleeing 0;
```

## See also

[fleeing](../commands/fleeing.md)

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