271 lines
8.6 KiB
Plaintext
271 lines
8.6 KiB
Plaintext
|
Scriptname _00E_FS_NQR05_Bossfight_FatherSC extends ReferenceAlias Conditional
|
||
|
|
||
|
;=====================================================================================
|
||
|
; EVENTS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
||
|
|
||
|
If !bIsEnemy && FS_NQR05.GetStage() == 320
|
||
|
|
||
|
If !bSideChosen && akAggressor == PlayerREF && (FS_NQR05_SidedWithTharael.GetValueInt() == 0 && FS_NQR05_SidedWithFather.GetValueInt() == 0)
|
||
|
SideAgainstFather()
|
||
|
EndIf
|
||
|
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnUpdate()
|
||
|
|
||
|
If FS_NQR05.GetStage() == 320
|
||
|
If !bAttemptingToFloat && !FS_NQR05_FatherREF.IsDead() && _00E_FS_NQR05_TeleportationOngoing.GetValueInt() == 0 && FS_NQR05_SidedWithTharael.GetValueInt() == 1
|
||
|
|
||
|
CastSpecialAttack()
|
||
|
|
||
|
ElseIf bAttemptingToFloat
|
||
|
|
||
|
Levitate()
|
||
|
|
||
|
EndIf
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnDying(Actor akKiller)
|
||
|
|
||
|
Self.GetReference().BlockActivation(True)
|
||
|
FS_NQR05.FS_NQR05_SC19_02_Cinematic.Stop()
|
||
|
FS_NQR05.StopMusic()
|
||
|
FS_NQR05.SetStage(325)
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Function SideAgainstFather()
|
||
|
|
||
|
bIsEnemy = true
|
||
|
bSideChosen = true
|
||
|
FS_NQR05_TharaelREF.GetActorBase().SetEssential(True)
|
||
|
FS_NQR05_TharaelREF.BlockActivation(True)
|
||
|
FS_NQR05_SidedWithTharael.SetValueInt(1)
|
||
|
FS_NQR05_SidedWithFather.SetValueInt(0)
|
||
|
FS_NQR05.SideWithCharacter(FS_NQR05_TharaelREF)
|
||
|
If FS_NQR05.GetStage() < 325
|
||
|
RegisterForSpecialAttack(5.0)
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function RegisterForSpecialAttack(float fSeconds)
|
||
|
|
||
|
RegisterForSingleUpdate(fSeconds)
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function Levitate()
|
||
|
|
||
|
FS_NQR05_FatherREF.MoveTo(FS_NQR05_Bossfight_Father_CenterMarker001)
|
||
|
Debug.SendAnimationEvent(FS_NQR05_FatherREF, "IdleNocturnalEnter")
|
||
|
Debug.SendAnimationEvent(FS_NQR05_FatherREF, "IdleNocturnal_Rise")
|
||
|
Utility.Wait(1)
|
||
|
FS_NQR05_FatherREF.SetAlpha(0.5)
|
||
|
FS_NQR05_Bossfight_AppearFatherMarker001.PlaceAtMe(FXDragonPriestSmallExplosion)
|
||
|
bAttemptingToFloat = false
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function TeleportToCenter()
|
||
|
|
||
|
If FS_NQR05_SidedWithTharael.GetValueInt() == 1
|
||
|
FS_NQR05_FatherREF.Say(FS_NQR05_D99_TharaelLaunch_BossfightTopic)
|
||
|
EndIf
|
||
|
|
||
|
fHealRateBefore = FS_NQR05_FatherREF.GetAV("HealRate")
|
||
|
FS_NQR05_FatherREF.SetAV("HealRate", 0.0)
|
||
|
FS_NQR05_FatherREF.SetMotionType(4)
|
||
|
_00E_FS_NQR05_TeleportationOngoing.SetValueInt(1)
|
||
|
FS_NQR05_FatherREF.SetGhost(true)
|
||
|
FS_NQR05_FatherREF.StopCombat()
|
||
|
FS_NQR05_FatherREF.StopCombatAlarm()
|
||
|
FS_NQR05_FatherREF.EvaluatePackage()
|
||
|
FS_NQR05_FatherREF.SetPlayerTeammate(False)
|
||
|
objPreviousPosition = FS_NQR05_FatherREF.PlaceAtMe(xMarker, 1)
|
||
|
FS_NQR05_FatherREF.PlaceAtMe(FXDragonPriestSmallExplosion)
|
||
|
GhostRedFXShader.Play(FS_NQR05_FatherREF)
|
||
|
FS_NQR05_FatherLightREF.Enable()
|
||
|
FS_NQR05_FatherREF.SetAlpha(0.0)
|
||
|
bAttemptingToFloat = true
|
||
|
RegisterForSingleUpdate(3.0)
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function TeleportBack()
|
||
|
|
||
|
FS_NQR05_FatherREF.SetGhost(False)
|
||
|
FS_NQR05_FatherREF.PlaceAtMe(FXDragonPriestSmallExplosion)
|
||
|
FS_NQR05_FatherLightREF.Disable()
|
||
|
FS_NQR05_FatherREF.MoveTo(FS_NQR05_Father_ReappearMarkerREF)
|
||
|
FS_NQR05_FatherREF.SetPlayerTeammate(True)
|
||
|
FS_NQR05_FatherREF.PlayIdle(IdleNocturnalExit)
|
||
|
FS_NQR05_FatherREF.PlayIdle(idleForceDefaultState)
|
||
|
FS_NQR05_FatherREF.PlaceAtMe(FXDragonPriestSmallExplosion)
|
||
|
FS_NQR05_FatherREF.SetAV("HealRate", fHealRateBefore)
|
||
|
FS_NQR05_FatherREF.SetActorValue("Aggression", 3)
|
||
|
GhostRedFXShader.Stop(FS_NQR05_FatherREF)
|
||
|
FS_NQR05_FatherREF.SetAlpha(1.0)
|
||
|
If FS_NQR05_SidedWithTharael.GetValueInt() == 0
|
||
|
_00E_QuestFunctions.SetNPCAsCompanion(FS_NQR05_FatherREF, True, 800, 600, 400)
|
||
|
EndIf
|
||
|
_00E_FS_NQR05_TeleportationOngoing.SetValueInt(0)
|
||
|
FS_NQR05_FatherREF.SetMotionType(1)
|
||
|
Utility.Wait(2)
|
||
|
FS_NQR05_FatherREF.PlayIdle(idleForceDefaultState)
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function CastSpecialAttack()
|
||
|
|
||
|
FS_NQR05_FatherREF.AddToFaction(IgnoreInCombatFaction)
|
||
|
FS_NQR05_FatherREF.SetGhost(True)
|
||
|
GhostRedFXShader.Play(FS_NQR05_FatherREF)
|
||
|
FS_NQR05_FatherREF.SetAlpha(0.5)
|
||
|
_00E_FS_NQR05_FatherSpecialAttackOngoing.SetValueInt(1)
|
||
|
TeleportToCenter()
|
||
|
FS_NQR05_TharaelREF.Say(FS_NQR05_D00_Bossfight_WarningTopic)
|
||
|
CreateClones()
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function CheckForDeath()
|
||
|
|
||
|
If akPlayerClone.IsDead() && akTharaelClone.IsDead()
|
||
|
_00E_FS_NQR05_TeleportationOngoing.SetValueInt(0)
|
||
|
_00E_FS_NQR05_FatherSpecialAttackOngoing.SetValueInt(0)
|
||
|
EndSpecialAttack()
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function CreateClones()
|
||
|
|
||
|
MAGIllusionReleaseFearSDM.Play(FS_NQR05_FatherREF)
|
||
|
IllusionDark01Imod.Apply()
|
||
|
Utility.Wait(1)
|
||
|
_00E_A2_ChaosruneImplosionSoundM.Play(FS_NQR05_FatherREF)
|
||
|
Utility.Wait(4)
|
||
|
FS_NQR05_FatherREF.PlaceAtMe(ExplosionIllusionMassiveDark01)
|
||
|
Game.ShakeCamera()
|
||
|
akPlayerClone = PlayerREF.PlaceActorAtMe(_00E_FS_NQR05_TharaelGhost) as Actor
|
||
|
akPlayerClone.PlaceAtMe(ExplosionIllusionDarkSmallNoEffects)
|
||
|
akTharaelClone = FS_NQR05_TharaelREF.PlaceActorAtMe(_00E_FS_NQR05_TharaelGhost) as Actor
|
||
|
akTharaelClone.PlaceAtMe(ExplosionIllusionDarkSmallNoEffects)
|
||
|
FS_NQR05_Father_Fight_Clone_02.ForceRefTo(akTharaelClone)
|
||
|
FS_NQR05_Father_Fight_Clone_01.ForceRefTo(akPlayerClone)
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function EndSpecialAttack()
|
||
|
|
||
|
FS_NQR05_Father_Fight_Clone_01.Clear()
|
||
|
FS_NQR05_Father_Fight_Clone_02.Clear()
|
||
|
akPlayerClone.PlaceAtMe(ExplosionIllusionDarkSmallNoEffects)
|
||
|
akPlayerClone.Delete()
|
||
|
akTharaelClone.PlaceAtMe(ExplosionIllusionDarkSmallNoEffects)
|
||
|
akTharaelClone.Delete()
|
||
|
UnregisterForUpdate()
|
||
|
GhostRedFXShader.Stop(FS_NQR05_FatherREF)
|
||
|
FS_NQR05_FatherREF.SetAlpha(1.0)
|
||
|
FS_NQR05_FatherREF.RemoveFromFaction(IgnoreInCombatFaction)
|
||
|
_00E_FS_NQR05_TeleportationOngoing.SetValueInt(0)
|
||
|
_00E_FS_NQR05_FatherSpecialAttackOngoing.SetValueInt(0)
|
||
|
TeleportBack()
|
||
|
|
||
|
FS_NQR05_FatherREF.EvaluatePackage()
|
||
|
|
||
|
_00E_FS_ForgottenStories_Functions ForgottenStoriesMiscDialogue = Game.GetFormFromFile(0x01016E89, "Enderal - Forgotten Stories.esm") as _00E_FS_ForgottenStories_Functions
|
||
|
|
||
|
If FS_NQR05_SidedWithFather.GetValueInt() == 1
|
||
|
ForgottenStoriesMiscDialogue.showActorHealthBars(FS_NQR05_FatherREF)
|
||
|
FS_NQR05_FatherREF.StartCombat(FS_NQR05_TharaelREF)
|
||
|
FS_NQR05_TharaelREF.StartCombat(PlayerREF)
|
||
|
Else
|
||
|
FS_NQR05_FatherREF.SetAV("Aggression", 3)
|
||
|
FS_NQR05_FatherREF.StartCombat(PlayerREF)
|
||
|
FS_NQR05_TharaelREF.StartCombat(FS_NQR05_FatherREF)
|
||
|
EndIf
|
||
|
|
||
|
GhostRedFXShader.Stop(FS_NQR05_FatherREF)
|
||
|
|
||
|
If FS_NQR05.GetStage() < 325
|
||
|
RegisterForSpecialAttack(35)
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
;=====================================================================================
|
||
|
; PROPERTIES
|
||
|
;=====================================================================================
|
||
|
|
||
|
bool Property bSideChosen Auto Conditional Hidden
|
||
|
bool bIsEnemy
|
||
|
bool bFloating
|
||
|
bool bAttemptingToFloat
|
||
|
|
||
|
float fDamageDone
|
||
|
float fHealRateBefore
|
||
|
|
||
|
_00E_FS_NQR05_Functions Property FS_NQR05 Auto
|
||
|
|
||
|
Actor akPlayerClone
|
||
|
Actor akTharaelClone
|
||
|
|
||
|
ActorBase Property Player Auto
|
||
|
ActorBase Property _00E_FS_NQR05_TharaelGhost Auto
|
||
|
Actor Property FS_NQR05_FatherREF Auto
|
||
|
Actor Property FS_NQR05_TharaelREF Auto
|
||
|
|
||
|
ReferenceAlias Property FS_NQR05_Father_Fight_Clone_01 Auto
|
||
|
ReferenceAlias Property FS_NQR05_Father_Fight_Clone_02 Auto
|
||
|
|
||
|
ObjectReference objPreviousPosition
|
||
|
|
||
|
Faction Property IgnoreInCombatFaction Auto
|
||
|
|
||
|
ObjectReference Property FS_NQR05_Bossfight_Father_CenterMarker001 Auto
|
||
|
ObjectReference Property FS_NQR05_Bossfight_AppearFatherMarker001 Auto
|
||
|
ObjectReference Property FS_NQR05_Father_ReappearMarkerREF Auto
|
||
|
ObjectReference Property FS_NQR05_FatherLightREF Auto
|
||
|
|
||
|
Idle Property idleForceDefaultState Auto
|
||
|
Idle Property IdleNocturnalEnter Auto
|
||
|
Idle Property IdleNocturnal_Rise Auto
|
||
|
Idle Property IdleNocturnalExit Auto
|
||
|
|
||
|
Sound Property _00E_A2_ChaosruneImplosionSoundM Auto
|
||
|
Sound Property MAGIllusionReleaseFearSDM Auto
|
||
|
|
||
|
GlobalVariable Property _00E_FS_NQR05_FatherSpecialAttackOngoing Auto
|
||
|
GlobalVariable Property FS_NQR05_SidedWithFather Auto
|
||
|
GlobalVariable Property FS_NQR05_SidedWithTharael Auto
|
||
|
GlobalVariable Property _00E_FS_NQR05_TeleportationOngoing Auto
|
||
|
|
||
|
ImageSpaceModifier Property IllusionDark01Imod Auto
|
||
|
|
||
|
EffectShader Property GhostRedFXShader Auto
|
||
|
|
||
|
Message Property _00E_FS_NQR05_Bossfight_IllusionName Auto
|
||
|
|
||
|
Static Property XMarker Auto
|
||
|
|
||
|
Topic Property FS_NQR05_D00_Bossfight_WarningTopic Auto
|
||
|
Topic Property FS_NQR05_D99_TharaelLaunch_BossfightTopic Auto
|
||
|
|
||
|
Explosion Property FXDragonPriestSmallExplosion Auto
|
||
|
Explosion Property ExplosionIllusionMassiveDark01 Auto
|
||
|
Explosion Property ExplosionIllusionDarkSmallNoEffects Auto
|
||
|
|
||
|
Actor Property PlayerREF Auto
|