Scripts

T_ScObj_DisplayCaseImp1

Tamriel_Data.esm
Variables 1
Local Variables
state
Source
1Begin T_ScObj_DisplayCaseImp1 2 3short state 4; 0 = initial state 5; 1 = opening 6; 2 = open 7; 3 = closing 8; 4 = closed 9 10if ( MenuMode == 1 ) 11 return 12endif 13 14if ( onActivate == 1 ) 15 if ( getLocked > 0 ) 16 playSound3D "LockedChest" 17 elseif ( state > 2 ) 18 set state to 1 19 playSound3DVP "Door Creaky Open" 0.5 1 20 elseif ( state < 3 ) 21 set state to 3 22 playSound3DVP "Door Creaky Close" 0.5 1 23 endif 24endif 25 26 27if ( state == 0 ); set the lid to closed 28 set state to 4 29endif 30 31if ( state == 1 ); the lid is opening 32 playGroup idle2 0 33 set state to 2 34 return 35endif 36 37if ( state == 2 ); the lid has finished opening 38 playGroup idle4 0 39 return 40endif 41 42if ( state == 3 ); the lid is closing 43 playGroup idle3 0 44 set state to 4 45 return 46endif 47 48if ( state == 4 ); the lid has finished closing 49 playGroup idle 0 50endif 51 52End