PDA

View Full Version : Need help in coding - Maddie!


Omario
12-02-2002, 11:47 AM
I decided to start some coding, I replaced the lead pipe with the model of a sword and changed the animation, I switched the bullet_lead pipe code so that the death cause of the sword would be "shotgun" I created two projectiles of a guy cut in half, in the default skeleton txt I changed which projectiles emitted by the shotgun deaths to be one upper torso projectile and the legs projectile. The death animation for the shotgun was changed so that the guy would go upwards and "dissapear" (so then the projectiles can comein as gibs) i compiled and everything and the end result was this:
-Sword would have the animations and projectile emitions of a RANDOMDEATH
- The shotgun would split the guy in two, but not always, sometimes he'd just diasppear and some times only the upper torso would be emitted and sometimes only the legs would be emitted
my question is: how can you not get this randomization of the projectiles and get it to have those two gibs emitted every single time. and also, why doesn't the sword have the shotgun deaths?

Maddieman
12-02-2002, 12:32 PM
Unfortunately, I'm going to have to be brief, since I got Vice City over the weekend. images/icons/grin.gif

The reason the sword is causing random death animations is simple: In order to improve hit detection, the leadpipe projectile creates an explosion. This creates a small sphere of damage which triggers the random death animations.

This is found in the bullet_leadpipe code here:

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> [Animation] Index = PROJECTILEANIM_EXPLODE; Filename = ..\dummy\dummy_l0.kf2;
[Properties]
{
[Message] Frame = 0; String = &quot;this->D_CreateDecal( bullethit_leadpipe );&quot;;
[Message] Frame = 0; String = &quot;this->P_Explosion( 0.80, 0.801, 9, 8.99, FALSE, FALSE, TRUE, FALSE );&quot;;
} [/code]</blockquote><font size="2" face="Verdana, Arial">I don't have time to explain it (check the documentation), but basically you have to remove the p_explosion line. However, this will muck up your hit detection (you'll need more projectiles).

As for the death animation, I don't know - you'll have to explain it better. If the character is going through the celing then perhaps the projectile gibs are clipping, or perhaps the animation is so long that it's timing out on you. You'll need to be more specific I'm afraid.

Hope that helps. images/icons/smile.gif

turns back to Vice City...