Scripts

TR_m2_q_22_CursedShield_Script

TR_Mainland.esm
Variables 2
Local Variables
state
timer
Source
1Begin TR_m2_q_22_CursedShield_Script 2 3short state 4float timer 5 6if ( state == 2 ) 7 set timer to ( timer + GetSecondsPassed ) 8 if ( timer > 5 ) 9 set state to 1 10 endif 11 return 12endif 13 14if ( player->GetSoundPlaying "Heavy Armor Hit" ) 15 if ( state == 1 ) 16 if ( player->HasItemEquipped TR_m2_q_22_CursedShield ) 17 PlaceAtPC "dwarven ghost" 1 128 1 18 set state to 2 19 set timer to 0 20 endif 21 endif 22endif 23 24if ( state ) 25 return 26endif 27 28if ( GetSoundPlaying Haunted == 0 ) 29 PlayLoopSound3DVP Haunted 1 1 30endif 31 32if ( OnActivate ) 33 if ( GetDeadCount TR_m2_q_22_Spectre == 0 ) 34 PlaySound3D "Dwemer Door Close" 35 Cast "spirit knife" player 36 else 37 Activate 38 set state to 1 39 set TR_m2_IC_HauntingShield to 1 40 endif 41endif 42 43End