IL-GSC/BO1/PC/ZM/animscripts/zombie_dog_death.gsc
2024-02-18 17:32:07 -05:00

38 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#using_animtree ("zombie_dog");
main()
{
self endon("killanimscript");
if ( IsDefined( self.a.nodeath ) )
{
assertex( self.a.nodeath, "Nodeath needs to be set to true or undefined." );
wait 3;
return;
}
self Unlink();
if ( IsDefined( self.enemy ) && IsDefined( self.enemy.syncedMeleeTarget ) && self.enemy.syncedMeleeTarget == self )
{
self.enemy.syncedMeleeTarget = undefined;
}
if ( IsDefined( self.tesla_death ) && self.tesla_death == true )
{
death_anims = [];
death_anims[death_anims.size] = %zombie_dog_tesla_death_a;
death_anims[death_anims.size] = %zombie_dog_tesla_death_b;
death_anims[death_anims.size] = %zombie_dog_tesla_death_c;
death_anims[death_anims.size] = %zombie_dog_tesla_death_d;
death_anims[death_anims.size] = %zombie_dog_tesla_death_e;
self animMode( "gravity" );
self clearanim(%root, 0.2);
self setflaggedanimrestart("dog_anim", death_anims[ randomint( death_anims.size ) ], 1, 0.2, 1);
self animscripts\zombie_shared::DoNoteTracks( "dog_anim" );
}
else
{
death_direction = animscripts\zombie_dog_pain::getAnimDirection( self.damageyaw );
self animMode( "gravity" );
self clearanim(%root, 0.2);
self setflaggedanimrestart("dog_anim", anim.dogAnims[self.animSet].death[death_direction], 1, 0.2, 1);
self animscripts\zombie_shared::DoNoteTracks( "dog_anim" );
}
}