getMissionLayerEntities: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|SYNTAX= |p21=" to "|SYNTAX2= |p21=") |
Lou Montana (talk | contribs) (Add server exec, thanks to Ansible2 for testing) |
||
Line 9: | Line 9: | ||
| 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.}} |DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 17: | Line 17: | ||
| [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE= | | [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE= | ||
|x1= <code>_base = [[getMissionLayerEntities]] "Base";</code> | |x1= <code>_base = [[getMissionLayerEntities]] "Base";</code> |EXAMPLE1= | ||
|EXAMPLE1= | |||
|x2= <code>[[waitUntil]] {([[player]] [[distance]] _someObject) > 800}; | |x2= <code>[[waitUntil]] {([[player]] [[distance]] _someObject) > 800}; | ||
{ | { | ||
[[deleteVehicle]] [[_x]]; | [[deleteVehicle]] [[_x]]; | ||
} [[forEach]] (( | } [[forEach]] (([[getMissionLayerEntities]] "Simple Objects") [[select]] 0); {{cc|Deletes all objects within that layer after the player is over 800m away from _someObject}}</code> |EXAMPLE2= | ||
|EXAMPLE2= | |||
|x3= <code>_layer1337Entities = [[getMissionLayerEntities]] 1337;</code> | |x3= <code>_layer1337Entities = [[getMissionLayerEntities]] 1337;</code> |EXAMPLE3= | ||
|EXAMPLE3= | |||
|s2= [[getMissionLayerEntities]] layerID |SYNTAX2= | |s2= [[getMissionLayerEntities]] layerID |SYNTAX2= | ||
|p21= layerID: [[Number]] - Layer ID in the editor.| | |p21= layerID: [[Number]] - Layer ID in the editor.|PARAMETER21= | ||
|r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE2= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[get3DENLayerEntities]] |SEEALSO= | | [[get3DENLayerEntities]] |SEEALSO= | ||
| | | |MPBEHAVIOUR= | ||
|exec= server |serverExec= | |||
}} | }} | ||
Line 62: | Line 57: | ||
<dt class="note">[[User:Revo|Revo]]</dt> | <dt class="note">[[User:Revo|Revo]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
After an [[object]] was deleted from a layer, | After an [[object]] was deleted from a layer, [[getMissionLayerEntities]] will return <NULL-object> for the deleted [[object]]. | ||
<br> | <br> | ||
<br> | <br> |
Revision as of 00:36, 24 December 2019
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:
- Uncategorised
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:
- get3DENLayerEntities
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)
- Revo
-
After an object was deleted from a layer, getMissionLayerEntities will return <NULL-object> for the deleted object.
Version: 1.65
Build: 139010