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

31 lines
943 B
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.

#include animscripts\Combat_utility;
#using_animtree ("zombie_dog");
main()
{
self endon("killanimscript");
self endon( "stop_flashbang_effect" );
wait RandomFloatRange( 0, 0.4 );
self ClearAnim(%root, 0.1);
duration = self startFlashBanged() * 0.001;
if ( duration > 2 && RandomInt( 100 ) > 60 )
{
self SetFlaggedAnimRestart( "flashed_anim", %zombie_dog_run_pain, 1, 0.2, self.animplaybackrate * 0.75 );
}
else
{
self SetFlaggedAnimRestart( "flashed_anim", %zombie_dog_run_flashbang, 1, 0.2, self.animplaybackrate );
}
animLength = getanimlength( %zombie_dog_run_flashbang ) * self.animplaybackrate;
if ( duration < animLength )
{
self animscripts\zombie_shared::DoNoteTracksForTime( duration, "flashed_anim" );
}
else
{
self animscripts\zombie_shared::DoNoteTracks( "flashed_anim" );
}
self SetFlashBanged( false );
self.flashed = false;
self notify( "stop_flashbang_effect" );
}