getMissionLayerEntities: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


|arma3|Game name=
|arma3|Game name=
Line 9: Line 8:


|gr2= Mission Information |GROUP2=
|gr2= Mission Information |GROUP2=
____________________________________________________________________________________________


| 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.
Line 15: Line 13:
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=
{{Informative | Default layers are not returned.}} |DESCRIPTION=
____________________________________________________________________________________________


| [[getMissionLayerEntities]] layerName |SYNTAX=
| [[getMissionLayerEntities]] layerName |SYNTAX=
Line 37: Line 34:


|r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE2=
|r2= [[Array]] in format <code>[objects:Array, markers:Array]</code> |RETURNVALUE2=
____________________________________________________________________________________________


| [[get3DENLayerEntities]] |SEEALSO=  
| [[get3DENLayerEntities]] |SEEALSO=  

Revision as of 01:12, 17 January 2021

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 are not returned.
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