{"name":"entities","title":"entities","type":"command","url":"https://community.bistudio.com/wiki/entities","revid":377164,"updated":"2026-01-01T10:42:33Z","groups":["Object Detection"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","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.\n\n> [!NOTE]\n> **Optimisation tip**: Keep number of types in both *includeTypes* and *excludeTypes* arrays to a minimum by possibly using parent/base classes.\n> If you have to use several types, arrange them in order so that the more common types go at the beginning of the array.","syntaxes":[{"syntax":"entities type","params":[{"name":"type","type":"String","description":"if an empty string `\"\"` is provided, all entities are returned","type_expr":"String"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"type"}},{"syntax":"entities [typesInclude, typesExclude, includeCrews, excludeDead]","since":"arma3 1.66","params":[{"name":"typesInclude","type":"Array","description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means include every entity. Method used for filtering - isKindOf","type_expr":"Array"},{"name":"typesExclude","type":"Array","description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means exclude no entity. Method used for filtering - isKindOf","type_expr":"Array"},{"name":"includeCrews","type":"Boolean","optional":true,"default":"false","description":"include crews currently in vehicles","type_expr":"Boolean","text":"includeCrews: Boolean - (Optional, default false) include crews currently in vehicles"},{"name":"excludeDead","type":"Boolean","optional":true,"default":"false","description":"exclude dead entities","type_expr":"Boolean","text":"excludeDead: Boolean - (Optional, default false) exclude dead entities"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"[typesInclude, typesExclude, includeCrews, excludeDead]"}}],"examples":[{"code":["_allCars = entities \"Car\";"]},{"text":"Return all alive entities on the map:\n\n```sqf\n_allAlive = entities [[], [], true, true];\n```","code":["_allAlive = entities [[], [], true, true];"]},{"text":"Return dead and alive entities but logic:\n\n```sqf\n_notLogic = entities [[], [\"Logic\"], true];\n```","code":["_notLogic = entities [[], [\"Logic\"], true];"]},{"text":"Return all alive west soldiers on foot:\n\n```sqf\n_footSoldiers = entities [[\"SoldierWB\"], [], false, true];\n```","code":["_footSoldiers = entities [[\"SoldierWB\"], [], false, true];"]}],"see_also":["nearEntities","allGroups","allUnits","units","vehicles","agents","playableUnits","switchableUnits","allPlayers","allDead","allDeadMen","allUnitsUAV","allCurators","allObjects","allMissionObjects","allSimpleObjects","allMines"]}