allMissionObjects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Formatting. Moved notes into the description.)
Line 4: Line 4:


|version1= 1.57
|version1= 1.57
|game1= tkoh
|version1= 1.00
|game1= arma3
|version1= 0.50


|gr1= Object Detection
|gr1= Object Detection


|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]]):
|descr= Returns all mission objects which were created by and during the mission with given type or its subtype. In some cases [[allMissionObjects]]. Sometimes [[allMissionObjects]] could be replaced by the much faster [[entities]] command.
</br></br>
Some of the unusual mission objects that can be detected with this command as well as with [[nearestObject]]:
* <tt>""</tt> - returns everything like agents, bees, mosquitoes, foot prints (footstep), armed mines...
* <tt>"all"</tt> - more restrictive than <tt>""</tt>: no ambient insects, just agents like rabbits and snakes, no foot prints, tracks, no armed mines
* <tt>"#slop"</tt> - blood drop
* <tt>"#slop"</tt> - blood drop
* <tt>"#mark"</tt> - unit footprints
* <tt>"#mark"</tt> - unit footprints
Line 19: Line 31:
* <tt>"EmptyDetector"</tt> - All [[trigger]]s
* <tt>"EmptyDetector"</tt> - All [[trigger]]s
* <tt>"Logic"</tt> - All game logics
* <tt>"Logic"</tt> - All game logics
{{Feature|Important|This command is quite performance heavy. Use with caution!}}
|mp= {{Feature|arma3|This command is ~5 times faster on a dedicated server than on a client. Reason unknown.}}


|s1= '''allMissionObjects''' type
|s1= '''allMissionObjects''' type
Line 34: Line 49:
|seealso= [[allDead]], [[allGroups]], [[allUnits]], [[entities]], [[vehicles]], [[allMines]], [[allSimpleObjects]]
|seealso= [[allDead]], [[allGroups]], [[allUnits]], [[entities]], [[vehicles]], [[allMines]], [[allSimpleObjects]]
}}
}}
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on June 22, 2012</dd>
<dt class="note">[[User:Rocket|Rocket]]</dt>
<dd class="note">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.
<dd class="notedate">Posted on Decembere 15, 2013</dd>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
<dd class="note">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.
<!-- Note Section END -->
</dl>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on March 25, 2021 - 18:47 (UTC)</dd>
<dt class="note">[[User:pierremgi|pierremgi]]</dt>
<dd class="note">{{#if:
|
|allMissionObjects "" returns everything like agents, bees, mosquitoes, foot prints (footstep), armed mines...<br>
allMissionObjects "All"  is more restrictive: no ambient insects, just agents like rabbits and snakes, no foot prints, tracks, no armed mines.
}}</dd>
</dl>

Revision as of 01:10, 26 March 2021

Hover & click on the images for description

Description

Description:
Returns all mission objects which were created by and during the mission with given type or its subtype. In some cases allMissionObjects. Sometimes allMissionObjects could be replaced by the much faster entities command.

Some of the unusual mission objects that can be detected with this command as well as with nearestObject:
  • "" - returns everything like agents, bees, mosquitoes, foot prints (footstep), armed mines...
  • "all" - more restrictive than "": no ambient insects, just agents like rabbits and snakes, no foot prints, tracks, no armed mines
  • "#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
This command is quite performance heavy. Use with caution!
Multiplayer:
Arma 3
This command is ~5 times faster on a dedicated server than on a client. Reason unknown.
Groups:
Object Detection

Syntax

Syntax:
allMissionObjects type
Parameters:
type: String
Return Value:
Array of Objects

Examples

Example 1:
_airObjects = allMissionObjects "Air";
Example 2:
{ deleteVehicle _x } forEach (allMissionObjects "");
Example 3:
_allMObjects =allMissionObjects "All";

Additional Information

See also:
allDeadallGroupsallUnitsentitiesvehiclesallMinesallSimpleObjects

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