Scripts

TR_m4_TJ_DrunkDaedroth_sc

TR_Mainland.esm
Variables 3
Local Variables
recover
isDead
timer
Source
1Begin TR_m4_TJ_DrunkDaedroth_sc 2 3float timer 4short recover 5short isDead 6 7; This Daedroth periodically falls on his face. 8 9if ( isDead ) 10 Return 11endif 12 13if ( CellChanged == 0 ) 14 if ( GetSoundPlaying "Haunted" == 0 ) 15 PlayLoopSound3D "Haunted" 16 endif 17endif 18 19if ( MenuMode ) 20 Return 21endif 22 23if ( onDeath ) 24 set isDead to 1 25 StopSound "Haunted" 26 PlaySound "T_SndObj_Hauntedfade" 27endif 28 29set timer to ( timer + GetSecondsPassed ) 30 31if ( recover == 1 ) 32 set recover to 2 33elseif ( recover == 2 ) 34 set recover to 0 35 ModCurrentFatigue 800 36endif 37 38if ( timer > 3 ) 39 ModCurrentFatigue -800 40 set timer to ( Random, 3 ) 41 set timer to ( timer - 12 ) 42 set recover to 1 43endif 44 45End