---
name: "allUnits"
type: command
status: ok
groups: ["Object Detection"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/allUnits
revid: 377076
updated: 2026-01-01T09:38:35Z
---

# allUnits

*Command · Object Detection · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Returns a list of all units, **except agents, dead units or units waiting for respawn**, outside and inside vehicles that were created on the following sides [east](../commands/east.md), [west](../commands/west.md), [independent](../commands/independent.md) and [civilian](../commands/civilian.md).

> [!NOTE]
> **Arma 3:** To get all units of given side, use `units Side`.

## Syntax

```sqf
allUnits
```

**Returns:** [Array](../topics/Array.md) of [object](../topics/Object.md)s

## Examples

### Example 1

```sqf
{ _x setDamage 0.5; _x groupChat "Braaains"; } forEach allUnits;
```

### Example 2

```sqf
allUnits apply { diag_log _x; };
```

## See also

[allGroups](../commands/allGroups.md) · [groups](../commands/groups.md) · [units](../commands/units.md) · [vehicles](../commands/vehicles.md) · [entities](../commands/entities.md) · [agents](../commands/agents.md) · [playableUnits](../commands/playableUnits.md) · [switchableUnits](../commands/switchableUnits.md) · [allPlayers](../commands/allPlayers.md) · [allDead](../commands/allDead.md) · [allDeadMen](../commands/allDeadMen.md) · [allUnitsUAV](../commands/allUnitsUAV.md) · [allCurators](../commands/allCurators.md) · [allObjects](../commands/allObjects.md) · [allMissionObjects](../commands/allMissionObjects.md) · [allSimpleObjects](../commands/allSimpleObjects.md) · [allMines](../commands/allMines.md)

## Community notes

**Pierre MGI** — 2018-09-06

It returns also BIS_SUPP_HQ created by support modules and headquarters Entity from HQ modules.

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