TR_m7_HH_Alvynu_6_GhostNPC_sc
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
control
controlQ
NoLore
NoHello
NoHit
NoThief
NoIdle
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m7_HH_Alvynu_6_GhostNPC_sc
2
3short TR_Map
4short control
5short controlQ
6short NoLore
7short NoHello
8short NoHit
9short NoThief
10short NoIdle
11short T_Local_NPC
12short T_Local_NoLore
13
14if ( CellChanged == 1 )
15 if ( "TR_m7_HH_Alvynu_6_TombState" == 1 )
16 if ( controlQ == 0 )
17 if ( GetDisabled == 1 )
18 Enable
19 endif
20 endif
21 elseif ( GetDisabled == 0 )
22 Disable
23 endif
24endif
25
26if ( control == 1 )
27 if ( MenuMode == 0 )
28 placeatme "T_Glb_Var_SummonFX" 1 1 1
29 set control to 2
30 set controlQ to 1
31 set "TR_m7_HH_Alvynu_6_SpiritsDealt" to ( "TR_m7_HH_Alvynu_6_SpiritsDealt" + 1 )
32 endif
33endif
34
35if ( controlQ == 0 )
36 ; Check GetHealth insetead of OnDeath to prevent looting
37 If ( GetHealth < 1 )
38 set controlQ to 1
39 If ( GetFatigue <= 0 )
40 PlaceAtMe "T_Glb_Var_GhostDeathFX1" 1 0 0
41 else
42 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0
43 endif
44 set "TR_m7_HH_Alvynu_6_SpiritsDealt" to ( "TR_m7_HH_Alvynu_6_SpiritsDealt" + 1 )
45 endif
46endif
47
48if ( controlQ == 1 )
49 if ( GetDisabled == 0 )
50 Disable
51 endif
52endif
53
54if ( TR_Map )
55 return
56endif
57
58set TR_Map to 7
59
60End