id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Scripting => Topic started by: xyzz on March 27, 2019, 08:32:08 AM

Title: Death Animation Stay
Post by: xyzz on March 27, 2019, 08:32:08 AM
Hi

I'm trying to add custom death animations to some monster. I've looked into Kaiser's Failure monster from his Sigma Quadrant map for reference and it works quite well. But what I'm trying to do is play two animations when dying. Death which is the dying animation and dead which is the dead pose. And it could burn after dead anim.

Can I get some help from you guys?

Thanks anyway

Code: [Select]
/*
=====================
monster_boss_creature::state_Dead
=====================
*/
void monster_boss_creature::state_Dead()
{
float creature_burn = getIntKey("no_burn_after_death");
playCustomAnim( "death" , 0, 4 );
setMoveType( MOVETYPE_STATIC );
stopMove();
stopRagdoll();
stopSound(SND_CHANNEL_BODY, false);
stopSound(SND_CHANNEL_BODY2, false);
if(creature_burn != 1)
{
preBurn();
sys.wait( .9 );
burn();
startSound( "snd_burn", SND_CHANNEL_BODY, false );
sys.wait( 4 );
remove();
}
playCustomAnim( "dead" , 0, 4 ); //THIS IS WHAT I WANT TO PLAY AND REMAIN IN THIS ANIM UNTIL BURN
}
Title: Re: Death Animation Stay
Post by: The Happy Friar on March 27, 2019, 01:38:20 PM
Cyberdemon has a death animation & stays put when dead, but it's a single animation that ends on a frame.  Doing it that way might work better then two animations.