enderalse/source/scripts/atronachfrostscript.psc

42 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

Scriptname AtronachFrostScript extends ActiveMagicEffect
;===============================================
;===============================================
;VisualEffect Property AtronachFrostEffect01 Auto
EffectShader Property AtronachFrostFXS Auto
EffectShader Property AtronachUnsummonDeathFXS Auto
Explosion Property deathExplosion Auto
Actor selfRef
int atronachHealth
EVENT OnEffectStart(Actor Target, Actor Caster)
2023-12-06 15:31:10 +00:00
selfRef = caster
;USKP 2.0.5 - Stop this from attaching to the player.
if( selfRef == Game.GetPlayer() )
Return
EndIf
;USKP 2.0.3 - 3D check needed
if( selfRef.Is3DLoaded() )
AtronachFrostFXS.Play(selfRef)
EndIf
ENDEVENT
Event OnEffectFinish(Actor akTarget, Actor akCaster)
AtronachFrostFXS.Stop(selfRef)
ENDEVENT
EVENT onDying(actor myKiller)
2023-12-08 02:45:53 +00:00
atronachHealth = selfRef.GetActorValue("Health") as int
if atronachHealth > 0
; debug.trace("frost health > 0")
AtronachFrostFXS.Stop(selfRef)
AtronachUnsummonDeathFXS.Play(selfRef)
elseIf atronachHealth <= 0
; debug.trace("frost health <= 0")
selfRef.placeAtMe(deathExplosion)
AtronachFrostFXS.Stop(selfRef)
endIf
ENDEVENT