enderalse/scripts/source/_00e_nq_g_03_petrifiedcombatsc.psc

109 lines
2.8 KiB
Plaintext
Raw Normal View History

Scriptname _00E_NQ_G_03_PetrifiedCombatSC extends ReferenceAlias
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnInit()
akSelf = Self.GetActorReference()
If NQ_G_03.GetStage() == 15
akSelf.SetGhost(false)
akSelf.SetActorValue("Aggression", 2)
EndIf
EndEvent
Event OnEnterBleedout()
If NQ_G_03.GetStage() < 20
SpawnProtectiveBarrier()
EndIf
EndEvent
Event OnUpdate()
if !akSelf.IsBleedingOut() || NQ_G_03.GetStage() >= 20
StopProtectiveBarrier()
Else
RegisterForSingleUpdate(1)
Endif
EndEvent
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
If (aeCombatState == 0)
NQ_G_03Functions.TryToChangeCombatSoundtrack()
ElseIf (aeCombatState == 1) && akTarget == Game.GetPlayer()
NQ_G_03Functions.TryToChangeCombatSoundtrack()
akSelf.SetActorValue("Aggression", 2)
akSelf.SetGhost(false)
EndIf
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function SpawnProtectiveBarrier()
_00E_A2_GhostwalkTeleportVFX.Play(akSelf)
AzuraEvil.Play(akSelf)
akSelf.SetAlpha(0.75)
If bIsDevra
If !_00E_NQ_G_03_AlyxREF.IsBleedingOut()
NightingaleStrifeAbsorbTargetVFX.Play(_00E_NQ_G_03_AlyxREF, akFacingObject = _00E_NQ_G_03_DevraREF)
Else
; Do nothing
EndIf
Else
If !_00E_NQ_G_03_DevraREF.IsBleedingOut()
NightingaleStrifeAbsorbTargetVFX.Play(_00E_NQ_G_03_DevraREF, akFacingObject = _00E_NQ_G_03_AlyxREF)
Else
; Do nothing
EndIf
EndIf
RegisterForSingleUpdate(1)
EndFunction
Function StopProtectiveBarrier()
AzuraEvil.Stop(akSelf)
akSelf.SetAlpha(1)
akSelf.RestoreActorValue("Health", (akSelf.GetBaseActorValue("Health")*__Config_fHealthPercentage))
MAGRestorationFFFire.Play(akSelf)
If (NQ_G_03.GetStage() == 15)
akSelf.StartCombat(Game.GetPlayer())
Endif
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
bool Property bIsDevra Auto
float Property __Config_fHealthPercentage = 0.3 Auto
Actor akSelf
Actor Property _00E_NQ_G_03_AlyxREF Auto
Actor Property _00E_NQ_G_03_DevraREF Auto
Quest Property NQ_G_03 Auto
_00E_NQ_G_03_Functions Property NQ_G_03Functions Auto
EffectShader Property AzuraEvil Auto
VisualEffect Property _00E_A2_GhostwalkTeleportVFX Auto
VisualEffect Property NightingaleStrifeAbsorbTargetVFX Auto
Sound Property MAGRestorationFFFire Auto