Scripts

TR_m7_Ns_StageFright_ScGhost

TR_Mainland.esm
Variables 3
Local Variables
ControlQ
TimerStart
timer
Source
1Begin TR_m7_Ns_StageFright_ScGhost 2 3short ControlQ 4short TimerStart 5float timer 6 7if ( "TR_m7_Ns_StageFright_ActState" == 2 ) 8 if ( GetDisabled == 1 ) 9 if ( MenuMode == 0 ) 10 Enable 11 placeatme "T_Glb_Var_SummonFX" 1 0 0 12 PlaySound3D "conjuration hit" 13 Set TimerStart to 1 14 Set timer to 0 15 endif 16 elseif ( CellChanged == 1 ) 17 Disable ;If the player leaves the theater/main stage, the ghost also disappears 18 Set "TR_m7_Ns_StageFright_ActState" to 3 19 endif 20elseif ( "TR_m7_Ns_StageFright_ActState" == 3 ) 21 if ( GetDisabled == 0 ) 22 if ( MenuMode == 0 ) 23 placeatme "T_Glb_Var_SummonFX" 1 0 0 24 Disable ;Fancy disable (kills or vanishes after Speaker dialogue) 25 endif 26 endif 27elseif ( "TR_m7_Ns_StageFright_ActState" == 5 ) 28 if ( MenuMode == 0 ) 29 if ( GetJournalIndex "TR_m7_Ns_StageFright" == 120 ) 30 if ( GetJournalIndex "TR_m7_Ns_StageFright_G" == 110 ) ;Speaker killed Mederyl route, appears after talked to Balis 31 if ( GetDisabled == 1 ) 32 Enable 33 PositionCell 435 1252 -379 19200 "Narsis, Hlaalu Theater" 34 AIWander 0 0 0 35 placeatme "T_Glb_Var_SummonFX" 1 0 0 36 PlaySound3D "conjuration hit" 37 Set TimerStart to 1 38 Set timer to 0 39 endif 40 elseif ( GetJournalIndex "TR_m7_Ns_StageFright_G" == 200 ) ;Vanishes after dialogue ends/blessing 41 if ( GetDisabled == 0 ) 42 placeatme "T_Glb_Var_SummonFX" 1 0 0 43 Disable 44 endif 45 endif 46 endif 47 endif 48elseif ( "TR_m7_Ns_StageFright_ActState" == 7 ) 49 if ( GetDisabled == 1 ) 50 if ( MenuMode == 0 ) 51 Enable 52 placeatme "T_Glb_Var_SummonFX" 1 0 0 53 PlaySound3D "conjuration hit" 54 Set TimerStart to 1 55 Set timer to 0 56 endif 57 endif 58elseif ( "TR_m7_Ns_StageFright_ActState" >= 8 ) 59 if ( GetDisabled == 0 ) 60 if ( MenuMode == 0 ) 61 placeatme "T_Glb_Var_SummonFX" 1 0 0 62 Disable ;Fancy disable after Speaker reconciliation 63 endif 64 endif 65elseif ( GetDisabled == 0 ) 66 Disable ;Initial disable 67endif 68 69if ( OnDeath == 1 ) 70 if ( "TR_m7_Ns_StageFright_ActState" == 2 ) 71 if ( player->HasSoulGem "TR_m7_Ns_DarathesGhost" > 0 ) 72 Journal "TR_m7_Ns_StageFright" 60 73 endif 74 Set "TR_m7_Ns_StageFright_ActState" to 3 75 elseif ( "TR_m7_Ns_StageFright_ActState" >= 7 ) 76 Set "TR_m7_Ns_StageFright_ActState" to 10 ;Failed reconciliation by banishing ghost, tracked for Greeting 1s 77 endif 78endif 79 80if ( TimerStart < 1 ) 81 return 82endif 83 84Set timer to ( timer + GetSecondsPassed ) 85if ( timer >= 2 ) 86 ForceGreeting 87 Set TimerStart to -1 88 return 89endif 90 91End