From Bohemia Interactive Community
Revision as of 18:11, 11 April 2024 by R3vo (talk | contribs) (variable naming ine xamples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for 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.
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.
Object Detection


entities type
type: String - if an empty string "" is provided, all entities are returned
Return Value:

Alternative Syntax

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


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];

Additional Information

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


Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note