---
name: "entities"
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/entities
revid: 377164
updated: 2026-01-01T10:42:33Z
---

# entities

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

## Description

Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored with the primary syntax.

> [!NOTE]
> **Optimisation tip**: Keep number of types in both *includeTypes* and *excludeTypes* arrays to a minimum by possibly using parent/base classes.
> If you have to use several types, arrange them in order so that the more common types go at the beginning of the array.

## Syntax

### Syntax 1

```sqf
entities type
```

**Parameters:**

- `type`: [String](../topics/String.md) - if an empty string `""` is provided, all entities are returned

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

### Syntax 2

*since arma3 1.66*

```sqf
entities [typesInclude, typesExclude, includeCrews, excludeDead]
```

**Parameters:**

- `typesInclude`: [Array](../topics/Array.md) - in format [type1, type2, ...typeN], where type is a [String](../topics/String.md). Empty array [] means include every entity. Method used for filtering - [isKindOf](../commands/isKindOf.md)
- `typesExclude`: [Array](../topics/Array.md) - in format [type1, type2, ...typeN], where type is a [String](../topics/String.md). Empty array [] means exclude no entity. Method used for filtering - [isKindOf](../commands/isKindOf.md)
- `includeCrews`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) include crews currently in vehicles
- `excludeDead`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) exclude dead entities

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

## Examples

### Example 1

```sqf
_allCars = entities "Car";
```

### Example 2

Return all alive entities on the map:

```sqf
_allAlive = entities [[], [], true, true];
```

### Example 3

Return dead and alive entities but logic:

```sqf
_notLogic = entities [[], ["Logic"], true];
```

### Example 4

Return all alive [west](../commands/west.md) soldiers on foot:

```sqf
_footSoldiers = entities [["SoldierWB"], [], false, true];
```

## See also

[nearEntities](../commands/nearEntities.md) · [allGroups](../commands/allGroups.md) · [allUnits](../commands/allUnits.md) · [units](../commands/units.md) · [vehicles](../commands/vehicles.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)

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