Scripts

TR_m3_Aim_BasementBarrelScp

TR_Mainland.esm
Variables 2
Local Variables
waterEnough
timer
Source
1begin TR_m3_Aim_BasementBarrelScp 2 3;during the Aimrah Dreugh questline the water level in the basement will rise. 4;this barrel will then float 5 6short waterEnough 7float timer 8 9if ( MenuMode ) 10 return 11endif 12 13if ( GetWaterLevel >= 185 ) 14 if ( GetWaterLevel <= 325 ) 15 set timer to GetPos, Z 16 set timer to ( timer + 20 * GetSecondsPassed ) 17 SetPos Z timer 18 else 19 set waterEnough to 1 20 endif 21endif 22 23if ( waterEnough == 1 ) 24 25 set timer to ( timer + GetSecondsPassed ) 26 27 ;rotate up 28 if ( timer < 2 ) 29 Rotate x 2 30 31 ;rotate down 32 elseif ( timer < 6 ) 33 Rotate x -2 34 35 ;up again 36 elseif ( timer < 8 ) 37 Rotate x 2 38 39 ;reset timer to zero 40 else 41 set timer to 0 42 endif 43 44endif 45 46 47end