{"name":"getMissionLayerEntities","operator":null,"title":"getMissionLayerEntities","type":"command","url":"https://community.bistudio.com/wiki/getMissionLayerEntities","revid":377616,"updated":"2026-01-02T08:51:45Z","groups":["Eden Editor","Mission Information"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.56"}],"since":{"game":"arma3","name":"Arma 3","version":"1.56"},"arma3_since":"1.56","branch":null,"locality":{"argument":null,"effect":null,"server_exec":true},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"layerName","type":"can be one of:","optional":false,"default":null,"description":"can be one of:\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","types":[],"since":null,"text":"layerName: can be one of:\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":null,"types":["Array"],"description":null,"text":"Array with [objects, markers, Arma 3 v2.14 groups] (or empty array if the layer does not exist)"},"form":"unary","operator":null,"left":null,"right":{"text":"layerName","types":[]}}],"examples":[{"text":"```sqf\nprivate _base = getMissionLayerEntities \"Base\";\n```","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;"]},{"text":"```sqf\nprivate _layer1337Entities = getMissionLayerEntities 1337;\n```","code":["private _layer1337Entities = getMissionLayerEntities 1337;"]},{"text":"```sqf\ngetMissionLayerEntities 42 params [[\"_objects\", []], [\"_markers\", []], [\"_groups\", []]];\n```","code":["getMissionLayerEntities 42 params [[\"_objects\", []], [\"_markers\", []], [\"_groups\", []]];"]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Eden Editor","Command Group: Mission Information","Introduced with Arma 3 version 1.56","Scripting Commands","Scripting Commands: Server Execution"]}