HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Real quick question

05-31-2004, 06:42 PM#1
PhaT
Heyas, i been trying to figure out and searching for so long to no avail, on how to make units have no corpse when they die? What I want is them to blow up (something like burbenogs) when they die, so it will reduce lag, instead of having corpses everywhere.

thanks in advance!
05-31-2004, 06:55 PM#2
JJ912
You can use a trigger so when a type of unit dies, you "Unit - Explode unit". Its more efficient to use a trigger the same way and simply "Unit - Remove unit from the game" though.

Other than that maybe if you set a unit in the Object Editor to "cant raise, does not decay"(its under Combat I think) it wont leave a corpse, but Im not sure.
05-31-2004, 11:21 PM#3
PhaT
hm, tried both to no avail, trigger doesnt seem to work either :(
anyoen got anything?
05-31-2004, 11:32 PM#4
Mr.Safety
Events
- A unit dies

No conditions.

Actions

- wait 5 seconds
- unit remove dying unit from the game

Note, that isn't the exact syntax (obviously) but something to that extent. Basically everytime a unit dies, it'll wait five seconds then remove it from the game. The reason I wait five seconds is so that the unit has time to play it's death animation. Other wise the unit would just disapear the moment it dies. You might want to wait 6 seconds just in case a unit has a really long death animation. But this should work for you.
06-01-2004, 05:35 AM#5
PhaT
but what I want is for it to have no death animation.. i want it to blow up as a death animation and leave no corpse so it'll lessen the lag.
06-01-2004, 06:16 AM#6
BBDino
hmmm i cant really think of how that could be done, if sure someone else will know but could you post the map this explosion thing is in so we could get a better look?
06-01-2004, 06:22 AM#7
Mr.Safety
Quote:
Originally Posted by PhaT
but what I want is for it to have no death animation.. i want it to blow up as a death animation and leave no corpse so it'll lessen the lag.
This lessens the lag. By removing the unit from the game it free's memory and therefore... lessens the lag. Plus I believe even if a unit explodes it's still exsists in memory for a duration anyway.
06-01-2004, 09:12 AM#8
PhaT
Hm, i thought Burbenogs TD was a popular map.. but i'll post it anyways

btw mr safety, what I mean is, i dont want corpses lying around causing fps to go down, i just want it to have no death animation
06-01-2004, 11:22 AM#9
Mech-AG05
i think i just realized what he meant.... not sure but do you mean an explosion of blood/guts? like when certain critters die?
06-01-2004, 12:39 PM#10
DoCa-Cola
Quote:
Originally Posted by PhaT
Hm, i thought Burbenogs TD was a popular map.. but i'll post it anyways

btw mr safety, what I mean is, i dont want corpses lying around causing fps to go down, i just want it to have no death animation
Is the blowing up needed? If you just want to lessen the lag, do what Safety said.

Code:
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Unit - Remove (Dying unit) from the game
06-01-2004, 04:41 PM#11
35263526
I think I understand what you want.

If you have a large number of units dying then triggers that remove them won't do much good (because the huge numbers of triggers going off will cause lag themselves).

I actually spent a while researching this a while back, and I this is the data I gathered:
  • When a unit dies, if it's death type is set to Does Decay or Is Revivable (or any combination of the two), it's stored in memory until the corpse is naturally or forcibly removed (such as by triggers). Even if you can't see a corpse (such as if it's been removed from the model), the unit information is still stored in memory.
  • Units that don't decay AND aren't revivably aren't stored in memory. Once their death animation plays, they're totally gone, and there's no way to bring them back.
So, just replacing a model's death animation with an explosion won't do anything to fight the lag beast. Although you can no longer see the model ingame, all the unit's data is still being stored. If you haven't got that many units dying, then use of removal triggers is perfectly sound, but it'd probably also be a good idea to set Death Type to Isn't Revivable and Doesn't Decay. If large numbers of units are dying, just set the death type correctly.

Also, I recommend that you have a small wait action after any revival triggers so that the unit doesn't simply wink out of existance. That'll give it a chance to play it's death animation.
06-01-2004, 07:41 PM#12
PhaT
Thanks for the replies everyone, and yes Mech-AG05, thats what I mean, like the types of deaths that animate dead units have, blowing up.

But even if they are gone does that really reduce lag? because when i play burbenogs, my frames per second are perfect because no corpses are lying around, but when I play any other TD my frames per second go to like 5 - 10 because of all the corpses. Any idea how burbenogs did it?