Thomas Banks 0 Posted November 23, 2021 Somewhat new to creating missions, trying to run clean-up once people leave an area for a multi-task scenario, the problem is I only want to delete particular sides and sideEmpty won't 'respond'. We are semi role-players and I spent a lot of time making the scenes look pretty to fit the back-story so there is a lot of junk leftover that I like to delete as we move on. In this scenario we are returning to a small part of the area and I still need blufor/logic to be there so I can't just delete everything, I'm trying to specifically delete civilian and sideEmpty. {deleteVehicle _x} foreach (allunits select {_x inArea thisTrigger && side _x == civilian}); Works {deleteVehicle _x} foreach (allunits select {_x inArea thisTrigger && side _x == sideEmpty}); Doesn't work My question is, why doesn't it work? It should, right? At the moment I'm using a trigger that deletes synchronised objects, it's not much of a hassle or any slower, but it's cumbersome and painful to look at. I've searched for a long time for a solution to no avail. The current state of the sideEmpty objects is just 'Show Model' and 'Enable Damage'. Default-state props do not delete with the command either, running the command in the editor playing as a unit. Can anyone help me? Thanks Share this post Link to post Share on other sites
mrcurry 496 Posted November 23, 2021 allUnits returns all units, it does not return all objects. All units is a subset of all objects and most definitely doesn't contain objects of sideEmpty. Since your using synched objects now and trying to replace them instead push the managed objects inside a 3den layer and use getMissionLayerEntities 1 Share this post Link to post Share on other sites
Thomas Banks 0 Posted November 23, 2021 Worked a treat, was unaware of that command, is there a way to make a single array from multiple layers? Or is it easier to run the command multiple times? I have 4 layers I need to delete with their own parents. Share this post Link to post Share on other sites
killzone_kid 1330 Posted November 23, 2021 there is no point combining 4 arrays it will be more expensive than run command 4 times on each of the arrays 1 Share this post Link to post Share on other sites