entities: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 38: | Line 38: | ||
|x2= Return all alive entities on the map: | |x2= Return all alive entities on the map: | ||
< | <sqf>_allalive = entities [[], [], true, true];</sqf> | ||
|x3= Return dead and alive entities but logic: | |x3= Return dead and alive entities but logic: | ||
< | <sqf>_notlogic = entities [[], ["Logic"], true];</sqf> | ||
|x4= Return all alive [[west]] soldiers on foot: | |x4= Return all alive [[west]] soldiers on foot: | ||
< | <sqf>_footsoldiers = entities [["SoldierWB"], [], false, true];</sqf> | ||
|seealso= [[nearEntities]] [[allUnits]] [[vehicles]] [[agents]] [[allMissionObjects]] | |seealso= [[nearEntities]] [[allUnits]] [[vehicles]] [[agents]] [[allMissionObjects]] | ||
}} | }} |
Revision as of 08:17, 14 May 2022
Description
- 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.
- Groups:
- Object Detection
Syntax
- Syntax:
- entities type
- Parameters:
- type: String - if an empty string "" is provided, all entities are returned
- Return Value:
- Array
Alternative Syntax
- Syntax:
- entities [typesInclude, typesExclude, includeCrews, excludeDead]
- Parameters:
- 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:
- Array
Examples
- Example 1:
- Example 2:
- Return all alive entities on the map:
- Example 3:
- Return dead and alive entities but logic:
- Example 4:
- Return all alive west soldiers on foot:
Additional Information
- See also:
- nearEntities allUnits vehicles agents allMissionObjects
Notes
-
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