Fixed Oorbaya explosions firing repeatedly in MQ11c after continuous attack with a torrent spell
This commit is contained in:
parent
bc36f45e94
commit
ec1f47ebb4
Binary file not shown.
@ -15,16 +15,23 @@ Event OnInit()
|
|||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
auto state Fighting
|
||||||
|
|
||||||
float CurrentHealth = Self.GetActorValue("Health")
|
|
||||||
|
|
||||||
If (CurrentHealth < (Self.GetBaseActorValue("Health")*0.03))
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
||||||
PlayDeathSequence()
|
|
||||||
EndIf
|
If (GetActorValue("Health") < BaseHealth * 0.03) && ! Dying
|
||||||
|
Dying = True
|
||||||
|
GotoState("Dying")
|
||||||
|
PlayDeathSequence()
|
||||||
|
EndIf
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
|
endstate
|
||||||
|
|
||||||
|
state Dying
|
||||||
|
; do nothing
|
||||||
|
endstate
|
||||||
|
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
; FUNCTIONS
|
; FUNCTIONS
|
||||||
@ -32,9 +39,7 @@ EndEvent
|
|||||||
|
|
||||||
Function PlayDeathSequence()
|
Function PlayDeathSequence()
|
||||||
|
|
||||||
Dying = True
|
|
||||||
Self.SetGhost(True)
|
Self.SetGhost(True)
|
||||||
UnregisterForUpdate()
|
|
||||||
;; Gavrant: the code below is commented out because combatIdleStart breaks something in AI and the oorbaya stops making attacks in a fight
|
;; Gavrant: the code below is commented out because combatIdleStart breaks something in AI and the oorbaya stops making attacks in a fight
|
||||||
;Debug.SendAnimationEvent(Self, "combatIdleStart")
|
;Debug.SendAnimationEvent(Self, "combatIdleStart")
|
||||||
AtronachUnsummonDeathFXS.Play(Self)
|
AtronachUnsummonDeathFXS.Play(Self)
|
||||||
@ -54,7 +59,7 @@ Function PlayDeathSequence()
|
|||||||
utility.wait(0.5)
|
utility.wait(0.5)
|
||||||
AtronachUnsummonDeathFXS.Stop(Self)
|
AtronachUnsummonDeathFXS.Stop(Self)
|
||||||
_00E_FXOorbayaTrailEffect2.Stop(Self)
|
_00E_FXOorbayaTrailEffect2.Stop(Self)
|
||||||
Self.SetAlpha (0.0,True)
|
Self.SetAlpha(0.0, True)
|
||||||
Self.SetCriticalStage(Self.CritStage_DisintegrateEnd)
|
Self.SetCriticalStage(Self.CritStage_DisintegrateEnd)
|
||||||
Wait(1.5)
|
Wait(1.5)
|
||||||
Self.KillEssential(PlayerREF)
|
Self.KillEssential(PlayerREF)
|
||||||
|
Loading…
Reference in New Issue
Block a user