PortalGunner 24 Posted April 13, 2019 Hi, I'm creating a mission parameter that deletes all pre-placed props (under Empty) in case our Zeus wants to change our spawns occasionally. So far this is what I have in the script: Spoiler getMissionLayerEntities "Extraneous" params[ "_objects", "_markers" ]; ExObj = (paramsArray select 9); switch (ExObj) do { // Disabled case 0: { { deleteVehicle _x; } forEach _objects; { deleteMarker _x; } forEach _markers; }; // Simulated case 1: { if (!isServer) exitWith {}; enableDynamicSimulationSystem false; }; // Dynamically Simulated case 2: { if (!isServer) exitWith {}; enableDynamicSimulationSystem true; }; }; What would I need to set as _objects to detect props? And will it detect and remove objects I've checked "Simple Object" on as well (if so that would be great)? I would like to be able to set a variable on objects in the editor to exclude them from this as well. Any help is appreciated, thanks! Edit: working code Share this post Link to post Share on other sites
Larrow 2823 Posted April 13, 2019 The easiest option is most probably to place all the objects that are removable onto a layer in the editor and get them all during runtime via getMissionLayerEntities. Share this post Link to post Share on other sites
PortalGunner 24 Posted April 13, 2019 4 minutes ago, Larrow said: The easiest option is most probably to place all the objects that are removable onto a layer in the editor and get them all during runtime via getMissionLayerEntities. I never actually noticed layers were a thing.. You'd think I would have by now. Thanks. Are objects I've checked "simple object" on in the editor removeable with my above script? Share this post Link to post Share on other sites
pierremgi 4906 Posted April 13, 2019 2 minutes ago, PortalGunner said: I never actually noticed layers were a thing.. You'd think I would have by now. Thanks. Are objects I've checked "simple object" on in the editor removeable with my above script? You can use allSimpleObjects . Share this post Link to post Share on other sites
PortalGunner 24 Posted April 13, 2019 3 minutes ago, pierremgi said: You can use allSimpleObjects . But I'm assuming I don't have to if they are on the same layer that I'm getting through getMissionLayerEntities. Share this post Link to post Share on other sites
Larrow 2823 Posted April 13, 2019 29 minutes ago, PortalGunner said: Are objects I've checked "simple object" on in the editor removeable with my above script? Yes getMissionLayerEntities "LayerName" params[ "_objects", "_markers" ]; { deleteVehicle _x; }forEach _objects; { deleteMarker _x; }forEach _markers; Share this post Link to post Share on other sites