getMissionLayerEntities: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[Magic Variables#x\|(_x)\]\]([^<]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 8: | Line 8: | ||
|gr2= Mission Information | |gr2= Mission Information | ||
|descr= Returns all entities within the specific [[Eden Editor: Layer|Eden Editor layer]] and its sub-layers. To be used when the scenario is running, not in the editor workspace. Useful to disable/enable whole parts of the scenario if layers are used during mission design. | |descr= Returns all entities within the specific [[Eden Editor: Layer|Eden Editor layer]] and its sub-layers. | ||
To be used when the scenario is running, not in the editor workspace. | |||
Useful to disable/enable whole parts of the scenario if layers are used during mission design. | |||
{{Feature|informative|Default layers are not returned.}} | {{Feature|informative|Default layers are not returned.}} | ||
Line 19: | Line 21: | ||
|r1= [[Array]] in format {{hl|[<nowiki/>[objects], [markers]]}} or empty array if the layer does not exist | |r1= [[Array]] in format {{hl|[<nowiki/>[objects], [markers]]}} or empty array if the layer does not exist | ||
|x1= < | |x1= <sqf>private _base = getMissionLayerEntities "Base";</sqf> | ||
|x2= delete all objects within that layer after the player is over 800m away from _someObject: | |x2= delete all objects within that layer after the player is over 800m away from _someObject: | ||
< | <sqf> | ||
waitUntil { sleep 1; (player distance _someObject) > 800 }; | |||
private _simpleObjects = (getMissionLayerEntities "Simple Objects") select 0; | private _simpleObjects = (getMissionLayerEntities "Simple Objects") select 0; | ||
{ | { | ||
deleteVehicle _x; | deleteVehicle _x; | ||
} forEach _simpleObjects;</ | } forEach _simpleObjects; | ||
</sqf> | |||
|x3= < | |x3= <sqf>private _layer1337Entities = getMissionLayerEntities 1337;</sqf> | ||
|seealso= [[get3DENLayerEntities]] | |seealso= [[get3DENLayerEntities]] |
Revision as of 09:35, 13 May 2022
Description
- Description:
- Returns all entities within the specific Eden Editor layer and its sub-layers. To be used when the scenario is running, not in the editor workspace. Useful to disable/enable whole parts of the scenario if layers are used during mission design.
- Groups:
- Eden EditorMission Information
Syntax
- Syntax:
- getMissionLayerEntities layerName
- Parameters:
- layerName: can be one of:
- Return Value:
- Array in format [[objects], [markers]] or empty array if the layer does not exist
Examples
- Example 1:
- Example 2:
- delete all objects within that layer after the player is over 800m away from _someObject:
- Example 3:
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
- Posted on Oct 26, 2016 - 15:27 (UTC)
- After an object was deleted from a layer, getMissionLayerEntities will return <NULL-object> for the deleted object.