Scripts

TR_m7_GanEttuSkyrender_sc

TR_Mainland.esm
Variables 4
Local Variables
attackstate
OnPCHitMe
control
timer
Source
1Begin TR_m7_GanEttuSkyrender_sc 2 3float timer 4short attackstate 5short OnPCHitMe 6short control 7 8; this script causes exterior NPCs to defend skyrender if attacked 9; disables if camp is wiped out in TR_m3_Ord_Doc4 10 11if ( control == 1 ) 12 return 13endif 14 15if ( GetJournalIndex TR_m7_Shin_GanEttuKill == 100 ) 16 setfight 100 17 set control to 1 18elseif ( GetJournalIndex "TR_m3_Ord_Doc4" == 102 ) 19 disable 20 set control to 1 21endif 22 23if ( OnPCHitMe == 1 ) 24 set attackstate to 1 25 set OnPCHitMe to 0 26endif 27 28if ( attackstate == 1 ) 29 StartCombat player 30 set timer to ( timer + GetSecondsPassed ) 31 if ( timer >= 1 ) 32 set timer to 0 33 if ( GetDeadCount "TR_m7_ChezhabiAnuransat" == 0 ) 34 "TR_m7_ChezhabiAnuransat"->StartCombat Player 35 endif 36 if ( GetDeadCount "TR_m7_Tuvizi" == 0 ) 37 "TR_m7_Tuvizi"->StartCombat Player 38 endif 39 if ( GetDeadCount "TR_m7_Dabu" == 0 ) 40 "TR_m7_Dabu"->StartCombat Player 41 endif 42 set attackstate to 0 43 endif 44endif 45 46End 47 48End