Jump to content
Sign in to follow this  
Thomas Banks

can't delete sideEmpty

Recommended Posts

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

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

 

  • Like 1

Share this post


Link to post
Share on other sites

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

there is no point combining 4 arrays it will be more expensive than run command 4 times on each of the arrays

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×