TR_m3_FG_OE8_Lich_sc
TR_Mainland.esm
Variables
3
Local Variables
control
controlQ
timer
Source
1Begin TR_m3_FG_OE8_Lich_sc
2
3short control
4short controlQ
5float timer
6
7if ( "TR_m3_FG_OE8_FightState" == 0 )
8 if ( GetDisabled == 0 )
9 Disable
10 endif
11elseif ( "TR_m3_FG_OE8_FightState" == 1 )
12 if ( MenuMode == 0 )
13 if ( control == 0 )
14 PlaySound3D "T_SndEnv_Woosh01"
15 set control to 1
16 else
17 set timer to ( timer + GetSecondsPassed )
18 if ( timer > 2.8 )
19 PlaySound3D "conjuration hit"
20 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
21 Enable
22 PlayGroup "Hit3" 1
23 ; On OpenMW, her animation needs to be reset back to "idle" or the fight breaks
24 ; But on vanilla, calling PlayGroup twice in one frame ignores the first call
25 if ( "MWSE_BUILD" == 0 )
26 PlayGroup "idle"
27 endif
28 set "TR_m3_FG_OE8_FightState" to 2
29 set timer to 0
30 endif
31 endif
32 endif
33elseif ( "TR_m3_FG_OE8_FightState" == 3 )
34 if ( MenuMode == 0 )
35 set timer to ( timer + GetSecondsPassed )
36 if ( timer > 4 )
37 PlaySound3D "conjuration hit"
38 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
39 Enable
40 setmagicka 1000
41 set "TR_m3_FG_OE8_FightState" to 4
42 set timer to 0
43 endif
44 endif
45elseif ( "TR_m3_FG_OE8_FightState" == 5 )
46 if ( MenuMode == 0 )
47 set timer to ( timer + GetSecondsPassed )
48 if ( timer > 4 )
49 PlaySound3D "conjuration hit"
50 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
51 Enable
52 setmagicka 1000
53 set "TR_m3_FG_OE8_FightState" to 6
54 set timer to 0
55 endif
56 endif
57endif
58
59if ( GetHealth > 0 )
60 if ( GetHealthGetRatio < 0.3 )
61 if ( "TR_m3_FG_OE8_FightState" < 5 )
62 set "TR_m3_FG_OE8_FightState" to 5
63 ; NOT PlaySound3D. That plays from the new position on vanilla
64 PlaySound "conjuration hit"
65 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
66 Disable
67 PositionCell 2268 1561 14464 2400 "Dobar Ancestral Tomb" ; MARK: TR_m3_MARK_FG_OE8_Lich
68 endif
69 elseif ( GetHealthGetRatio < 0.6 )
70 if ( "TR_m3_FG_OE8_FightState" < 3 )
71 set "TR_m3_FG_OE8_FightState" to 3
72 PlaySound "conjuration hit"
73 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
74 Disable
75 PositionCell 2546 1570 14464 20220 "Dobar Ancestral Tomb" ; MARK: TR_m3_MARK_FG_OE8_Lich
76 endif
77 endif
78elseif ( "TR_m3_FG_OE8_FightState" < 7 )
79 set "TR_m3_FG_OE8_FightState" to 7
80endif
81
82if ( controlQ == 0 )
83 if ( GetHealthGetRatio < 1.0 )
84 set controlQ to 1
85 setfight 100
86 startcombat "Player"
87 endif
88endif
89
90End