Author Topic: Time it takes for a ship to die...  (Read 1836 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Time it takes for a ship to die...
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.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline redsniper

  • 211
  • Aim for the Top!
Re: Time it takes for a ship to die...
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.
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Time it takes for a ship to die...
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.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Time it takes for a ship to die...
That's on my list of features to add. :)

 

Offline BS403

  • 29
  • I'm just sitting in my Cave.
Re: Time it takes for a ship to die...
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.
http://woogleville.myminicity.com/

Homer: Aw, twenty dollars! I wanted a peanut!
Homer's Brain: Twenty dollars can buy many peanuts.
Homer: Explain how.
Homer's Brain: Money can be exchanged for goods and services.
Homer: Woo-hoo!

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Time it takes for a ship to die...
Hmm.. i was thinking it more for this... but as it was pointed out that ships may have different dying times due to SEXPs then i need to rework the whole thingye
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline BS403

  • 29
  • I'm just sitting in my Cave.
Re: Time it takes for a ship to die...
Ahh pay no attention to what i said.
http://woogleville.myminicity.com/

Homer: Aw, twenty dollars! I wanted a peanut!
Homer's Brain: Twenty dollars can buy many peanuts.
Homer: Explain how.
Homer's Brain: Money can be exchanged for goods and services.
Homer: Woo-hoo!

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Time it takes for a ship to die...
In general, for big ships:

Code: [Select]
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

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Time it takes for a ship to die...
Yay for Goober! That is exactly what i needed.

Big thanks once again.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Time it takes for a ship to die...
You're welcome. :)