SCTX |
ScriptName SE32Fanatic3Script
Short SwingWeapon ; Flag to tell the idle manager which idle to play
Short DeathCount ; Set to one to prevent Fanatic from being double counted
; One of the four Fanatics will be killing Althel and pulling the lever.
; If all are alive, Fanatic 3 does it.
; If Fanatic 3 is dead (Hloval solution), Fanatic 1 does it.
; If Fanatic 1 is dead (Desideratus solution), Fanatic 3 does it.
; If Fanatic 2 is dead (Althel solution), Fanatic 4 Boss does it.
; All package blocks are conditionalized for the player being in the cell. If he is not, the scene is reset.
Begin OnLoad
SetGhost 1 ; No combat allowed
EquipItem WeapIronWarhammer 1
End
Begin GameMode
If IsWeaponOut == 0
If GetDead == 0
SetAlert 1
EndIf
EndIf
End
Begin OnActivate
If IsActionRef Player == 1 && GetDead == 0 && GetStageDone SE32 55 == 0
If GetStageDone SE32 40 == 1
If Player.GetItemCount SE32Doll >= 1
SetStage SE32 55 ; If the PC has the doll, "place" it on the Fanatic
Else
MessageBox "It feels as though I might be able to connect with the ghost. Maybe the time isn't right yet."
EndIf
Else
MessageBox "It feels as though I might be able to connect with the ghost. Maybe the time isn't right yet."
EndIf
EndIf
End
Begin OnPackageChange SE32TravelSoldier01
If SE32.InBailey == 1
Set SE32.Shout to 8
SayTo SE32VitharnSoldier01Ref SE32FanaticYell ; specific dialogue line
Set SwingWeapon to 1
PickIdle ; Attack anim if SwingWeapon = 1
Set SwingWeapon to 0 ; Disallows swinging weapon idle
Set SE32.SoldierDead to SE32.SoldierDead +1 ; 2 = both Fanatics have swung
If SE32HlovalDrethRef.HlovalPowered == 1 ; Hloval puzzle solved, allows
Kill ; Soldier to kill Fanatic
Set SE32.Fanatic3Dead to 1
EndIf
EndIf
End
Begin OnPackageChange SE32TravelAlthel01
If SE32.InBailey == 1
Set SE32.Shout to 7
SayTo SE32AlthelRef SE32FanaticYell ; specific dialogue line
Set SwingWeapon to 1
PickIdle
Set SwingWeapon to 0 ; Disallows swinging weapon idle
Set SE32.AlthelDead to 1
EndIf
End
Begin OnPackageChange SE32PullLever
If SE32.InBailey == 1
AddScriptPackage SE32TravelExit
SE32Fanatic4BossRef.AddScriptPackage SE32TravelExit ; Boss has been guarding, now goes with
EndIf
End
Begin OnPackageChange SE32TravelExit
If SE32.InBailey == 1 && SE32.StartScene > 1
Set SE32.Fanatic3Dead to 1 ; Fanatic has exited the room or died
MoveTo SE32Fanatic3Away
EndIf
End
Begin OnDeath
If DeathCount == 0
If GetStageDone SE32 1 == 0
SetStage SE32 1 ; tell the player he's killed one of the Fanatics
Set DeathCount to 1 ; insures this Fanatic isn't counted twice
ElseIf GetStageDone SE32 2 == 0
SetStage SE32 2 ; tell the player he's now killed two of the Fanatics
Set DeathCount to 1 ; insures this Fanatic isn't counted twice
EndIf
EndIf
End
|