Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Wanderer on February 07, 2007, 02:25:18 pm
-
So how is the time that it takes from a ship to actually disappear from ship/object index lists after its hit points have reached zero? For several freighters i manually clocked something about 3.6 seconds but capital ships seem to have much larger 'dying time'. Is it related to ships total hitpoint count, shockwave values, set somewhere in the code, etc.... ?
So if any one has knowledge of this please tell me.
-
I think it's related to how much damage the explosion does. Although I also know that with proper fredding you can make a ship explode almost instantly without the whole death-roll thing.
-
Yeah, it depends mainly on the damage. You can set a special explosion for the ship to control the dying time. You can also make it kamikaze if you want it to blow up instantly.
-
That's on my list of features to add. :)
-
I thought it was based on the mass of the ship. I had a death star model take 10+ minutes to explode and it only had the hitpoints of the colossus.
-
Hmm.. i was thinking it more for this (http://www.hard-light.net/forums/index.php/topic,45089.0.html)... but as it was pointed out that ships may have different dying times due to SEXPs then i need to rework the whole thingye
-
Ahh pay no attention to what i said.
-
In general, for big ships:
delta_time = 3000 + 3000 + (int)(damage*4.0f + 4.0f*objp->radius);
That's in milliseconds.
You can see more detail, and more special cases, by opening the following link and searching for delta_time:
http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/fs2_open/code/ship/shiphit.cpp?annotate=2.70
-
Yay for Goober! That is exactly what i needed.
Big thanks once again.
-
You're welcome. :)