Ship Systems Information

More
19 years 2 weeks ago #12889 by Joco
Replied by Joco on topic Ship Systems Information
Hi. I've been doing some more testing with the concept of debri generation on ship death. One of the interesting things I have noticed is that when a ship dies and the death_script is called all the subsims have zero hitpoints. It looks like that when the ship dies all the subsims get their hitpoints set to zero.

Has anyone in the past found ways around this? I will of course continue to poke at this area. [8D]

Thanks,
Joco.

Please Log in or Create an account to join the conversation.

More
19 years 2 weeks ago #12892 by MajorTom
Replied by MajorTom on topic Ship Systems Information
How did you determine if the hit points are set to 0?
Are you using Flamineo's damage mod?

That damage mod has lots of great ideas and examples on identifying and manipulating subsims. (the biggest problem with subsims is to identify the (ini file) template, iirc)

On sims you can reset the hit points easily because they are an object property of the sim. I would assume it's the same on subsims.

On sims the (float) properties are:
"hit_points" = the dynamic value of the current hitpoints value
"max_hit_points" = the static value of the max. hit points (taken from the subsim ini file)

When respawning the player ships in MP after they have been destroyed we use, for example:
Object.SetFloatProperty (player, "hit_points", Object.FloatProperty( player, "max_hit_points" )/2);

Something like that might be usefull to (re-)set the hit points at 50% on a subsim when creating your debris.

I know for sure, you can (re-)set the (int) object property of ammo based weapons (subsims) with a simple Object.SetIntProperty call. So, you should be able to set the hit_points too.



Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 2 weeks ago #12893 by Joco
Replied by Joco on topic Ship Systems Information
Gah - FLOAT! I thought would be Int. That's why it was always coming through as zero.
Getting the real values now.

Please Log in or Create an account to join the conversation.