{"name":"entities","operator":null,"title":"entities","type":"command","url":"https://community.bistudio.com/wiki/entities","revid":377164,"updated":"2026-01-01T10:42:33Z","groups":["Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.60"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.60"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"type","type":"String","optional":false,"default":null,"description":"if an empty string `\"\"` is provided, all entities are returned","types":["String"],"since":null,"text":"type: String - if an empty string `\"\"` is provided, all entities are returned"}],"returns":{"type":"Array of Objects","types":["Array","Object"],"description":null,"text":"Array of Objects"},"form":"unary","operator":null,"left":null,"right":{"text":"type","types":["String"]}},{"syntax":"entities [typesInclude, typesExclude, includeCrews, excludeDead]","since":"arma3 1.66","effect":null,"exec":null,"params":[{"name":"typesInclude","type":"Array","optional":false,"default":null,"description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means include every entity. Method used for filtering - isKindOf","types":["Array"],"since":null,"text":"typesInclude: Array - in format [type1, type2, ...typeN], where type is a String. Empty array [] means include every entity. Method used for filtering - isKindOf"},{"name":"typesExclude","type":"Array","optional":false,"default":null,"description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means exclude no entity. Method used for filtering - isKindOf","types":["Array"],"since":null,"text":"typesExclude: Array - in format [type1, type2, ...typeN], where type is a String. Empty array [] means exclude no entity. Method used for filtering - isKindOf"},{"name":"includeCrews","type":"Boolean","optional":true,"default":"false","description":"include crews currently in vehicles","types":["Boolean"],"since":null,"text":"includeCrews: Boolean - (Optional, default false) include crews currently in vehicles"},{"name":"excludeDead","type":"Boolean","optional":true,"default":"false","description":"exclude dead entities","types":["Boolean"],"since":null,"text":"excludeDead: Boolean - (Optional, default false) exclude dead entities"}],"returns":{"type":"Array","types":["Array"],"description":null,"text":"Array"},"form":"unary","operator":null,"left":null,"right":{"text":"[typesInclude, typesExclude, includeCrews, excludeDead]","types":["Array"]}}],"examples":[{"text":"```sqf\n_allCars = entities \"Car\";\n```","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];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["nearEntities","allGroups","allUnits","units","vehicles","agents","playableUnits","switchableUnits","allPlayers","allDead","allDeadMen","allUnitsUAV","allCurators","allObjects","allMissionObjects","allSimpleObjects","allMines"],"notes":[],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Detection","Introduced with Arma 2: Operation Arrowhead version 1.60","Scripting Commands","Take On Helicopters: Scripting Commands"]}