Arma 3 Scripting

Command in Object Detection

entities

Also available as Markdown and JSON, or read the original wiki page.

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

entities type

Parameters:

Returns: Array of Objects

Syntax 2

since arma3 1.66

entities [typesInclude, typesExclude, includeCrews, excludeDead]

Parameters:

Returns: Array

Examples

Example 1

_allCars = entities "Car";

Example 2

Return all alive entities on the map:

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

Example 3

Return dead and alive entities but logic:

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

Example 4

Return all alive west soldiers on foot:

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

See also

nearEntities · allGroups · allUnits · units · vehicles · agents · playableUnits · switchableUnits · allPlayers · allDead · allDeadMen · allUnitsUAV · allCurators · allObjects · allMissionObjects · allSimpleObjects · allMines