Jump to content

Removing destroyed units


Dusty [CPC]

Recommended Posts

Hi guys,

 

I've been using MIST for a training mission, where I basically respawn ground units on demand.

 

I can't seem to find a way to remove the destroyed units wrecks from the field.

Group.destroy('group1')

That removes the remaining alive units. That works ok.

 

 

I tried

for k,obj in pairs(mist.getDeadMapObjsInZones('Zone1'))
do
Object.destroy(obj)
end

But I guess the wrecks are not considered standard objects, so it's not working.

 

Anyone knows?

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

That DB contains all map objects such as buildings, bridges, ect. that get killed. I'll see if I can make a garbage collector script.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

That DB contains all map objects such as buildings, bridges, ect. that get killed. I'll see if I can make a garbage collector script.

Thank you!

Or if you could point me in the right direction, ie. tell me which type of object I should be looking for, I could also keep digging :book:

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • 3 weeks later...
That DB contains all map objects such as buildings, bridges, ect. that get killed. I'll see if I can make a garbage collector script.

 

That would be great, I'm having the same problem, re-spawning often occurs on top off or very nearby destroyed units.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

ABSOLUTELY!

 

One of the most needed functions now that missions are getting more and more scripted. The wrecks are doing the AI No Good At All!

 

Any way to remove the wrecks and debris in zones (the airports mainly) would serve us hugely!

 

DCS%20AI%20Wrecks.jpg

Link to comment
Share on other sites

I thought about this for planes and helicoperts, for exact the same reason as Quip showed, but the only way I found, was to remove the whole group, if one of its elements fail.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

What I think is needed is the following:

As soon as a mist-type script detects a destroyed object of any/specific (?) type inside the zone(s), these are removed.

 

The reason I say "as soon as" and "any", is because any debris will upset the AI trying to taxi. Regardless of whether it's an aircraft or any other object type.

 

And then there's still the problem with the AI running into ground units that may be on the taxiways. I would wish for a script that moved any ground units inside a zone to a perimeter outside that zone.

 

I would do this myself, but I'm already struggling to use mist etc properly: i'm no programmer. :/

 

What I really wish for is for ED to finally fix this. It's been a problem since Flanker 2. But so far we've been able to live with it. But as I said: as the missions get ever more scripted...

Link to comment
Share on other sites

  • 2 weeks later...

Quip, the problem is that I don't believe the scripting engine provides an easy way to do what you're asking (or even if it is possible at all). It's easy to find live units and remove them. Once they're dead/killed/destroyed, though, that's a totally different story.

Link to comment
Share on other sites

Ok - i understand.

What baffles me is that ED have no system in place to handle this out of the box automatically. The whole AI / ATC is beyond stupid. I feel like we're running in circles trying to solve problems that should be managed by the game. Even Falcon 4 did this better in its v1.0.

Link to comment
Share on other sites

  • 4 weeks later...
That DB contains all map objects such as buildings, bridges, ect. that get killed. I'll see if I can make a garbage collector script.

 

 

Grimes,

Any luck with this cleanup script? This seems to be a huge issue with high capacity servers running for long times. I was thinking it may be impossible till I seen the CTTS script able to pick up damaged/dead cargo. Thinking if that object can be manipulated, the aircraft and vehicle wrecks should be able to as well.

 

Please coders, we need to find a solution.

 

Thank you,

Shahdoh

Link to comment
Share on other sites

That DB contains all map objects such as buildings, bridges, ect. that get killed. I'll see if I can make a garbage collector script.

 

Hey Grimes,

 

Think you could specify a time delay for a destroyed unit to be cleared from field based from the time it was destroyed for a crew to clear the wreckage.

Link to comment
Share on other sites

hey shadoh,

 

here is the link to my mission, it has the functions to remove units before they expload and generate an explosion.

 

https://copy.com/fgUUq2dNettv

 

 

let me know if i can help further, ill drop into the virtual aerobatics TS.

Link to comment
Share on other sites

  • 2 months later...

Haven't seen anything on this for a while. Were you able to set up your garbage collector script, Grimes?

Steve (Slick)

 

ThrustMaster T.Flight Hotas X | TrackIR5 Pro | EVGA GTX 1070 | Win10 64-bit Professional | Dell Precision 7920 Workstation | 1 TB SSD | 128 GB Memory | Dual Intel Xeon Platinum 2.0 GHz 16 Core Processors (64 Total w/HT ON) | 24" Dell Monitor

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...