entities

From Bohemia Interactive Community
Revision as of 10:28, 13 May 2022 by Lou Montana (talk | contribs) (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>")
Jump to navigation Jump to search

{{RV|type=command

|game1= arma2oa |version1= 1.60

|game2= tkoh |version2= 1.00

|game3= arma3 |version3= 0.50

|gr1= Object Detection

|descr= 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.

|s1= entities type

|p1= type: String - if an empty string "" is provided, all entities are returned

|r1= Array

|s2= entities [typesInclude, typesExclude, includeCrews, excludeDead]

|s2since= arma3 1.66

|p21= typesInclude: Array - in format [type1, type2, ...typeN], where type is a String. Empty array [] means include every entity. Method used for filtering - isKindOf

|p22= typesExclude: Array - in format [type1, type2, ...typeN], where type is a String. Empty array [] means exclude no entity. Method used for filtering - isKindOf

|p23= includeCrews: Boolean - (Optional, default false) include crews currently in vehicles

|p24= excludeDead: Boolean - (Optional, default false) exclude dead entities

|r2= Array

|x1=

_allcars = entities "Car";

|x2= Return all alive entities on the map: _allalive = entities [[], [], true, true];

|x3= Return dead and alive entities but logic: _notlogic = entities [[], ["Logic"], true];

|x4= Return all alive west soldiers on foot: _footsoldiers = entities [["SoldierWB"], [], false, true];

|seealso= nearEntities allUnits vehicles agents allMissionObjects }}