OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wedgie_Mutha on 10 Jul 2003, 11:39:00
-
Hi all,
does anyone know how to clear dead units from the map. I have a mission that involves a lot of units, once they start piling up, the game begins to crawl...
Id like to have a trigger/script that will clear dead units from the map.
Any ideas?
Thanks
Wedgie
-
HI Wedgie.. there is one in the Editors Depot here...
http://www.ofpec.com/editors/browse.php?browsewhat=1&start=75
if you can get it to work you will be a god damn genius mate because no-one else can get it to work...
sorry i couldnt be of much more help.
Rhys
-
bump-ity bump. ;D
-
Please, anyone got any ideas? anyone want to volunteer to write the script for me? ::)
-
someone named Phelican in the scripting part of these forums is claiming to have a script that works, i have requested that he email me that script.
he should post it here at the forums, because this question is currently being asked in two forums over three different topics, and i see it frequently.
i have just finished spending too much time with this same script, and although i got over the error message with proper syntax, i could never get those bodies to leave either.
-
:D Read THIS (http://www.ofpec.com/yabbse/index.php?board=4;action=display;threadid=11123) thread :-*
-
You can only delete dead bodies a short time after their death, typically 30-45 seconds. After that, you can't refer to that unit anymore. I believe it is the same reason why "count units groupname" takes a while to get the correct number of units after some have been killed. "alive _x" count units groupname works instantly.
-
...I believe it is the same reason why "count units groupname" takes a while to get the correct number of units after some have been killed. "alive _x" count units groupname works instantly.
In my experience, the count command doesn't update instantly because the leader of the unit's group needs to know that unit is dead.
So if you hear the "Oh no, x is down" then count will 'update' ;)
That may be why you can't reference a dead body (the leader knows the unit is dead, hence it's not the unit anymore), I'm not really sure. I've never played around with it much ;)