Scripts

TR_m2_445_sc_s7fx

TR_Mainland.esm
Variables 2
Local Variables
initialized
localTimer
Source
1Begin TR_m2_445_sc_s7fx 2 3short initialized 4float localTimer 5 6if ( MenuMode ) 7 Return 8endif 9 10;; initialize if timer resets in the right state 11if ( localTimer > TR_m2_445_grindertimer ) 12 if ( initialized == 0 ) 13 if ( TR_Necrom_MachineState == 4 ) 14 set initialized to 1 15 elseif ( TR_Necrom_MachineState == 7 ) 16 set initialized to 1 17 endif 18 else 19 if ( TR_Necrom_MachineState != 4 ) 20 if ( TR_Necrom_MachineState != 5 ) 21 set initialized to 0 22 endif 23 endif 24 endif 25endif 26set localTimer to TR_m2_445_grindertimer 27 28;; run only if spinning gear animation is happening 29if ( initialized == 0 ) 30 Return 31elseif ( initialized == 1 ) 32 if ( localTimer > 5.8 ) 33 set initialized to 2 34 SetPos X 247.842 35 SetPos Y 113.4479 36 else 37 Return 38 endif 39elseif ( initialized == 2 ) 40 if ( localTimer > 10.3333333 ) 41 set initialized to 3 42 SetPos X 273.1108 43 SetPos Y 27.06892 44 else 45 Return 46 endif 47elseif ( initialized == 3 ) 48 if ( localTimer > 17.3333333 ) 49 set initialized to 4 50 SetPos X 270.5518 51 SetPos Y -117.885 52 else 53 Return 54 endif 55elseif ( initialized == 4 ) 56 if ( localTimer > 21.8666667 ) 57 set initialized to 0 58 SetPos X 209.9665 59 SetPos Y -191.855 60 else 61 Return 62 endif 63else 64 Return 65endif 66 67ExplodeSpell TR_m2_445_SpikePoison 68PlaySound3DVP "destruction area" 1 1.5 69 70End