Scripts

TR_m7_Ns_IC2_ghost2_sc

TR_Mainland.esm
Variables 10
Local Variables
TR_Map
T_Local_NPC
T_Local_NoLore
control
controlQ
NoLore
stage
NoHello
nothief
timer
Source
1Begin TR_m7_Ns_IC2_ghost2_sc 2;Controls appearance of ghost of Ossic Malance in Sael-Hla 3;Copy of NPC rather than positioncell for simplicity 4;e.g. if ghost1 was turned hostile or player left cell before it resurrected 5 6short TR_Map 7short T_Local_NPC 8short T_Local_NoLore 9short control 10short controlQ 11short NoLore 12short stage 13short NoHello 14short nothief 15float timer 16 17set TR_Map to 7 18 19if ( stage == 3 ) 20 return 21endif 22 23if ( GetJournalIndex TR_m7_Ns_IC2 < 40 ) 24 Disable 25endif 26 27if ( OnActivate == 1 ) 28 if ( GetHealth < 1 ) 29 return 30 else 31 Activate 32 endif 33endif 34 35if ( stage == 0 ) 36 if ( GetJournalIndex TR_m7_Ns_IC2 == 40 ) 37 enable 38 ;PlayGroup WeaponOneHand 1 39 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0 40 set timer to 0 41 set stage to 1 42 endif 43endif 44 45if ( stage == 1 ) 46 if ( MenuMode ) 47 return 48 endif 49 50 set timer to ( timer + GetSecondsPassed ) 51 52 if ( timer > 4 ) 53 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0 54 set timer to 0 55 set stage to 2 56 PlayGroup WeaponOneHand 57 endif 58endif 59 60if ( stage == 2 ) 61 if ( MenuMode ) 62 return 63 endif 64 65 set timer to ( timer + GetSecondsPassed ) 66 67 if ( timer > 2 ) 68 Disable 69 set stage to 3 70 endif 71 72endif 73 74End