allMissionObjects: Difference between revisions
Jump to navigation
Jump to search
(created) |
No edit summary |
||
(68 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2oa |= | |game1= arma2oa | ||
|version1= 1.57 | |||
|1. | |game2= tkoh | ||
|version2= 1.00 | |||
| | |game3= arma3 | ||
|version3= 0.50 | |||
| | |gr1= Object Detection | ||
| | |descr= Returns all objects of the given type that are currently present in the mission. In some cases, the [[entities]] and [[allObjects]] commands are much faster alternatives to this command.<br> | ||
Some of the special types that can be detected with this command (and with [[nearestObject]]): | |||
* {{hl|""}} - returns everything, e.g. agents, bees, mosquitoes, footprints, armed mines, ... | |||
* {{hl|"all"}} - more restrictive than {{hl|""}}: no ambient insects, only agents such as rabbits and snakes, no footprints, tracks, no armed mines | |||
* {{hl|"#slop"}} - blood drops | |||
* {{hl|"#mark"}} - unit footprints | |||
* {{hl|"#track"}} - vehicle tracks | |||
* {{hl|"#crater"}} - explosion craters on the ground | |||
* {{hl|"#crateronvehicle"}} - bullet marks on vehicles | |||
* {{hl|"#explosion"}} - explosions | |||
* {{hl|"#objectdestructed"}} - building, tree or bush destruction | |||
* {{hl|"#soundonvehicle"}} - sounds created with [[say3D]] for example | |||
* {{hl|"#dynamicsound"}} - sound sources created using [[createSoundSource]] | |||
* {{hl|"EmptyDetector"}} - all [[Trigger]]s | |||
* {{hl|"Logic"}} - 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 | |||
| | |p1= type: [[String]] | ||
| | |r1= [[Array]] of [[Object]]s | ||
| | |x1= <sqf>_airObjects = allMissionObjects "Air";</sqf> | ||
|x2= <sqf>{ deleteVehicle _x; } forEach (allMissionObjects "");</sqf> | |||
| | |x3= <sqf>_allMObjects = allMissionObjects "All";</sqf> | ||
| | |seealso= [[allObjects]] [[allDead]] [[allGroups]] [[allUnits]] [[entities]] [[vehicles]] [[allMines]] [[allSimpleObjects]] | ||
}} | }} | ||
Latest revision as of 08:52, 24 September 2024
Description
- Description:
- Returns all objects of the given type that are currently present in the mission. In some cases, the entities and allObjects commands are much faster alternatives to this command.
Some of the special types that can be detected with this command (and with nearestObject):- "" - returns everything, e.g. agents, bees, mosquitoes, footprints, armed mines, ...
- "all" - more restrictive than "": no ambient insects, only agents such as rabbits and snakes, no footprints, tracks, no armed mines
- "#slop" - blood drops
- "#mark" - unit footprints
- "#track" - vehicle tracks
- "#crater" - explosion craters on the ground
- "#crateronvehicle" - bullet marks on vehicles
- "#explosion" - explosions
- "#objectdestructed" - building, tree or bush destruction
- "#soundonvehicle" - sounds created with say3D for example
- "#dynamicsound" - sound sources created using createSoundSource
- "EmptyDetector" - all Triggers
- "Logic" - all game logics
- Multiplayer:
- Groups:
- Object Detection
Syntax
- Syntax:
- allMissionObjects type
- Parameters:
- type: String
- Return Value:
- Array of Objects
Examples
- Example 1:
- Example 2:
- Example 3:
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