Removing destroyed units - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-12-2013, 03:48 PM   #1
Dusty
Junior Member
 
Join Date: Oct 2010
Posts: 71
Default Removing destroyed units

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.
Code:
Group.destroy('group1')
That removes the remaining alive units. That works ok.


I tried
Code:
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?
__________________
Dusty is offline   Reply With Quote
Old 10-12-2013, 07:39 PM   #2
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 7,975
Default

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.
__________________
You can only tie the world record for lowest flight.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 10-12-2013, 09:50 PM   #3
Dusty
Junior Member
 
Join Date: Oct 2010
Posts: 71
Default

Quote:
Originally Posted by Grimes View Post
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
__________________
Dusty is offline   Reply With Quote
Old 10-30-2013, 02:50 PM   #4
PondLife
Junior Member
 
Join Date: Aug 2013
Posts: 87
Default

Quote:
Originally Posted by Grimes View Post
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.
PondLife is offline   Reply With Quote
Old 10-31-2013, 09:05 AM   #5
St3v3f
Member
 
St3v3f's Avatar
 
Join Date: Jul 2012
Posts: 491
Default

I don't know if that is possible. I tried doing that, but world.searchObjects didn't return anything after units were destroyed.
__________________
aka: Baron
St3v3f is offline   Reply With Quote
Old 11-17-2013, 10:29 PM   #6
Fishbreath
Member
 
Join Date: Sep 2012
Posts: 698
Default

Has there been any news on this? As a temporary fix, I'm going to have stationary units move a little when they spawn, but being able to remove them would be great.
__________________
Black Shark, Harrier, and Hornet pilot
Many Words - Serial Fiction | Ka-50 Employment Guide | Ka-50 Avionics Cheat Sheet | Multiplayer Shooting Range Mission
Fishbreath is offline   Reply With Quote
Old 11-18-2013, 07:52 AM   #7
Dusty
Junior Member
 
Join Date: Oct 2010
Posts: 71
Default

Still waiting for any hints on how to accomplish this...
__________________
Dusty is offline   Reply With Quote
Old 11-23-2013, 12:27 PM   #8
Raf
Member
 
Raf's Avatar
 
Join Date: May 2013
Posts: 117
Default

Same, would come handy to programmatically clean wreckages. Especially since I'm going to respawn them... in the same spot.
Wasn't there a time within they were cleaned, anyway?
Raf is offline   Reply With Quote
Old 03-18-2014, 11:19 AM   #9
Quip
Member
 
Join Date: Feb 2013
Posts: 147
Default

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!

Quip is offline   Reply With Quote
Old 03-18-2014, 11:44 AM   #10
SNAFU
Member
 
SNAFU's Avatar
 
Join Date: Jan 2009
Posts: 728
Default

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.
__________________


Unsere Facebook-Seite
SNAFU is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:06 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.