getMissionLayerEntities: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
|arma3 | |arma3 | ||
|1.56 | |1.56 | ||
|gr1= Eden Editor | |gr1= Eden Editor | ||
|gr2= Mission Information | |gr2= Mission Information | ||
| Returns all entities within specific [[Eden Editor]] layer. To be used when the scenario is running, not in the editor workspace. | | Returns all entities within specific [[Eden Editor]] layer. To be used when the scenario is running, not in the editor workspace. | ||
Useful for disabling / enabling whole parts of the scenario which you add to specific layer while editing. | Useful for disabling / enabling whole parts of the scenario which you add to specific layer while editing. | ||
{{Informative | Default layers are not returned.}} | {{Informative | Default layers are not returned.}} | ||
| [[getMissionLayerEntities]] layerName | | [[getMissionLayerEntities]] layerName | ||
|p1= layerName: [[String]] - Layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used. | |p1= layerName: [[String]] - Layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used. | ||
|r1= [[Array]] in format <code>[objects:Array, markers:Array]</code> | |r1= [[Array]] in format <code>[objects:Array, markers:Array]</code> | ||
|x1= <code>_base = [[getMissionLayerEntities]] "Base";</code> | |x1= <code>_base = [[getMissionLayerEntities]] "Base";</code> | ||
|x2= <code>[[waitUntil]] {([[player]] [[distance]] _someObject) > 800}; | |x2= <code>[[waitUntil]] {([[player]] [[distance]] _someObject) > 800}; | ||
{ | { | ||
[[deleteVehicle]] [[_x]]; | [[deleteVehicle]] [[_x]]; | ||
} [[forEach]] (([[getMissionLayerEntities]] "Simple Objects") [[select]] 0); {{cc|Deletes all objects within that layer after the player is over 800m away from _someObject}}</code> | } [[forEach]] (([[getMissionLayerEntities]] "Simple Objects") [[select]] 0); {{cc|Deletes all objects within that layer after the player is over 800m away from _someObject}}</code> | ||
|x3= <code>_layer1337Entities = [[getMissionLayerEntities]] 1337;</code> | |x3= <code>_layer1337Entities = [[getMissionLayerEntities]] 1337;</code> | ||
|s2= [[getMissionLayerEntities]] layerID | |s2= [[getMissionLayerEntities]] layerID | ||
|p21= layerID: [[Number]] - Layer ID in the editor.|PARAMETER21= | |p21= layerID: [[Number]] - Layer ID in the editor.|PARAMETER21= | ||
|r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> | |r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> | ||
| [[get3DENLayerEntities]] | | [[get3DENLayerEntities]] | ||
|serverExec= server |SERVEREXEC= | |serverExec= server |SERVEREXEC= |
Revision as of 00:40, 18 January 2021
Description
- Description:
- Returns all entities within specific Eden Editor layer. To be used when the scenario is running, not in the editor workspace. Useful for disabling / enabling whole parts of the scenario which you add to specific layer while editing.
- Groups:
- Eden EditorMission Information
Syntax
- Syntax:
- getMissionLayerEntities layerName
- Parameters:
- layerName: String - Layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used.
- Return Value:
- Array in format
[objects:Array, markers:Array]
Alternative Syntax
- Syntax:
- getMissionLayerEntities layerID
- Parameters:
- layerID: Number - Layer ID in the editor.
- Return Value:
- Array in format
[objects:Array, markers:Array]
Examples
- Example 1:
_base = getMissionLayerEntities "Base";
- Example 2:
waitUntil {(player distance _someObject) > 800}; { deleteVehicle _x; } forEach ((getMissionLayerEntities "Simple Objects") select 0); // Deletes all objects within that layer after the player is over 800m away from _someObject
- Example 3:
_layer1337Entities = getMissionLayerEntities 1337;
Additional Information
- See also:
- See also needed
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
Bottom Section
- Posted on October 26, 2016 - 15:27 (UTC)
- R3vo
-
After an object was deleted from a layer, getMissionLayerEntities will return <NULL-object> for the deleted object.
Version: 1.65
Build: 139010