---
name: "allDead"
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/allDead
revid: 377005
updated: 2026-01-01T08:15:58Z
---

# allDead

*Command · Object Detection · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.57*

## Description

Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.

## Syntax

```sqf
allDead
```

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

## Examples

### Example 1

```sqf
{ deleteVehicle _x } forEach allDead;
```

### Example 2

allAlive:

```sqf
_all = allUnits + vehicles;
{
    _all pushBack agent _x;
} forEach (agents - [teamMemberNull]);
allAlive = _all - allDead;
```

## See also

[allDeadMen](../commands/allDeadMen.md) · [allUnits](../commands/allUnits.md) · [allGroups](../commands/allGroups.md) · [playableUnits](../commands/playableUnits.md) · [switchableUnits](../commands/switchableUnits.md) · [units](../commands/units.md) · [vehicles](../commands/vehicles.md) · [allCurators](../commands/allCurators.md)

## Community notes

**Ebay** — 2017-04-06

This also returns bodies hidden with [hideBody](../commands/hideBody.md) until they are deleted. Tested in A2OA 1.63.131129

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