{"name":"getMissionLayerEntities","title":"getMissionLayerEntities","type":"command","url":"https://community.bistudio.com/wiki/getMissionLayerEntities","revid":379518,"updated":"2026-10-31T00:29:25Z","groups":["Eden Editor","Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","locality":{"server_exec":true},"description":"Returns all entities within the specific Eden Editor layer and its sub-layers.\nTo be used when the scenario is running, not in the editor workspace.\nUseful to disable/enable whole parts of the scenario if layers are used during mission design.\n\n> [!NOTE]\n> Default layers are not returned.","syntaxes":[{"syntax":"getMissionLayerEntities layerName","params":[{"name":"layerName","type":"String or Number","description":"String or Number\n\n- String - case-insensitive; layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used\n- Number - layer ID in the editor","type_expr":"String | Number","text":"layerName: String or Number\n\n- String - case-insensitive; layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used\n- Number - layer ID in the editor"}],"returns":{"type":"Array","type_expr":"Array","description":"with [objects, markers, Arma 3 v2.14 groups] (or empty array if the layer does not exist)","text":"Array with [objects, markers, Arma 3 v2.14 groups] (or empty array if the layer does not exist)"},"form":"unary","right":{"text":"layerName"}}],"examples":[{"code":["private _base = getMissionLayerEntities \"Base\";"]},{"text":"delete all objects within that layer after the player is over 800m away from _someObject:\n\n```sqf\nwaitUntil { sleep 1; (player distance _someObject) > 800 };\nprivate _simpleObjects = (getMissionLayerEntities \"Simple Objects\") select 0;\n{\n    deleteVehicle _x;\n} forEach _simpleObjects;\n```","code":["waitUntil { sleep 1; (player distance _someObject) > 800 };\nprivate _simpleObjects = (getMissionLayerEntities \"Simple Objects\") select 0;\n{\n\tdeleteVehicle _x;\n} forEach _simpleObjects;"]},{"code":["private _layer1337Entities = getMissionLayerEntities 1337;"]},{"code":["getMissionLayerEntities 42 params [[\"_objects\", []], [\"_markers\", []], [\"_groups\", []]];"]}],"see_also":["get3DENLayerEntities"],"notes":[{"user":"R3vo","date":"2016-10-26T15:27:00Z","text":"After an object was deleted from a layer, getMissionLayerEntities will return `<NULL-object>` for the deleted object."}]}