allMissionObjects: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[.*\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
(added EmptyDetector and Logic as valid value) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2oa | |game1= arma2oa | ||
|1.57 | |version1= 1.57 | ||
|gr1= Object Detection | |gr1= Object Detection | ||
| Returns all mission objects (created by or during a mission) with given type (or its subtype). In some cases [[allMissionObjects]] could be substituted with [[entities]], which would be much much faster alternative. Some of the unusual mission objects that can be detected with this command (as well as with [[nearestObject]]): | |descr= Returns all mission objects (created by or during a mission) with given type (or its subtype). In some cases [[allMissionObjects]] could be substituted with [[entities]], which would be much much faster alternative. Some of the unusual mission objects that can be detected with this command (as well as with [[nearestObject]]): | ||
* <tt>"#slop"</tt> - blood drop | * <tt>"#slop"</tt> - blood drop | ||
* <tt>"#mark"</tt> - unit footprints | * <tt>"#mark"</tt> - unit footprints | ||
Line 17: | Line 17: | ||
* <tt>"#soundonvehicle"</tt> - sound created with [[say3D]] for example | * <tt>"#soundonvehicle"</tt> - sound created with [[say3D]] for example | ||
* <tt>"#dynamicsound"</tt> - sound source created using [[createSoundSource]] | * <tt>"#dynamicsound"</tt> - sound source created using [[createSoundSource]] | ||
* <tt>"EmptyDetector"</tt> - All [[trigger]]s | |||
* <tt>"Logic"</tt> - All game logics | |||
| '''allMissionObjects''' type | |s1= '''allMissionObjects''' type | ||
|p1 = type: [[String]] | |p1 = type: [[String]] | ||
| [[Array]] of [[Object|Objects]] | |r1= [[Array]] of [[Object|Objects]] | ||
|x1= <code>_airObjects = [[allMissionObjects]] "Air";</code> | |x1= <code>_airObjects = [[allMissionObjects]] "Air";</code> | ||
Line 48: | Line 50: | ||
</dl> | </dl> | ||
{{GameCategory|arma2|Scripting Commands}} | {{GameCategory|arma2|Scripting Commands}} | ||
{{GameCategory|arma3|Scripting Commands}} | {{GameCategory|arma3|Scripting Commands}} | ||
{{GameCategory|tkoh|Scripting Commands}} | {{GameCategory|tkoh|Scripting Commands}} | ||
Revision as of 01:36, 18 February 2021
Description
- Description:
- Returns all mission objects (created by or during a mission) with given type (or its subtype). In some cases allMissionObjects could be substituted with entities, which would be much much faster alternative. Some of the unusual mission objects that can be detected with this command (as well as with nearestObject):
- "#slop" - blood drop
- "#mark" - unit footprints
- "#track" - vehicle tracks
- "#crater" - explosion crater on the ground
- "#crateronvehicle" - bullet marks on vehicle
- "#explosion" - an explosion
- "#objectdestructed" - building, tree or bush destruction
- "#soundonvehicle" - sound created with say3D for example
- "#dynamicsound" - sound source created using createSoundSource
- "EmptyDetector" - All triggers
- "Logic" - All game logics
- Groups:
- Object Detection
Syntax
Examples
- Example 1:
_airObjects = allMissionObjects "Air";
- Example 2:
{ deleteVehicle _x } forEach (allMissionObjects "");
- Example 3:
_allMObjects =allMissionObjects "All";
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
- Posted on June 22, 2012
- Rocket
- Be VERY careful with the use of this command. It is very demanding as it must iterate through all mission created objects. Particular care should be taken exercising this often on dedicated servers.
- Posted on Decembere 15, 2013
- Killzone_Kid
- For some reason in Arma 3 this command is up to 5 times faster on the dedicated server than on a connected client. In my experiments it took on average 5 ms for the command to complete on a client while under 1 ms on the server.