entities: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored. When "" is passed for the type | | Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored. When "" is passed for the type, all entity types are returned. | ||
<br><br>Alternative syntax introduced in Arma 3 v1.65.138685 allows to filter entities by type and alive status as well as to return entities currently in vehicles.<br><br>'''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. |= Description | <br><br>Alternative syntax introduced in Arma 3 v1.65.138685 allows to filter entities by type and alive status as well as to return entities currently in vehicles.<br><br>'''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. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ |
Revision as of 23:21, 6 October 2016
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. When "" is passed for the type, all entity types are returned.
Alternative syntax introduced in Arma 3 v1.65.138685 allows to filter entities by type and alive status as well as to return entities currently in vehicles.
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. - Groups:
- Uncategorised
Syntax
Alternative Syntax
- Syntax:
- entities [typesInclude, typesExclude, includeCrews, excludeDead] since Arma 3 v1.65.138685
- Parameters:
- [typesInclude, typesExclude, includeCrews, excludeDead]: Array
- 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 (Optional): Boolean - include crews currently in vehicles. Default: false
- excludeDead (Optional): Boolean - exclude dead entities. Default: false
- Return Value:
- Array
Examples
- 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
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
Notes
- Posted on Mar 27, 2014 - 20:26
- ffur2007slx2_5
- In ArmA3 ver 1.14 type (string) can be any children class under configfile >> "CfgVehicles". e.g.
entities "All"; //or entities "CAManBase"; etc.
Bottom Section
- Posted on July 12, 2016 - 22:37 (UTC)
- MisterGoodson
-
In A3 1.62
entities "CAManBase"
does not include entities inside vehicles (crew).
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.60
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Uncategorised
- ArmA 2: New Scripting Commands List
- Arma 3: New Scripting Commands List
- Scripting Commands ArmA2
- Scripting Commands Arma 3