getMissionLayerEntities: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (description)
m (added new syntax)
Line 13: Line 13:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''getMissionLayerEntities''' layerName |SYNTAX=
| [[getMissionLayerEntities]] layerName |SYNTAX=
|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. |PARAMETER1=
|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. |PARAMETER1=
| [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE=  
| [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE=  


Line 26: Line 26:
} [[forEach]] (('''getMissionLayerEntities''' "Simple Objects") [[select]] 0);//Deletes all objects within that layer after the player is over 800m away from _someObject</code>
} [[forEach]] (('''getMissionLayerEntities''' "Simple Objects") [[select]] 0);//Deletes all objects within that layer after the player is over 800m away from _someObject</code>
|EXAMPLE2=  
|EXAMPLE2=  
|x3= <code>_layer1337Entities = [[getMissionLayerEntities]] 1337;</code>
|EXAMPLE3=
|s2= [[getMissionLayerEntities]] layerID |SYNTAX=
|p21= layerID: [[Number]] - Layer ID in the editor.|PARAMETER1=
|r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE=


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 11:50, 30 May 2019

Hover & click on the images for description

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. Default layers cannot be accessed this way.
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