enderalse/source/scripts/flameatronacheffectscript.psc

56 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

Scriptname FlameAtronachEffectScript extends ActiveMagicEffect
{This is a temp script to get the art working right for the flame atronach.}
;===============================================
import utility
import form
;===============================================
Actor selfRef
VisualEffect Property AtronachFlameTrail Auto
Armor Property AtronachFlameDeadSkin Auto
EffectShader Property AtronachFlameDeathFXS Auto
EffectShader Property AtronachUnsummonDeathFXS Auto
explosion property AtronachFlameDeathExplosion auto
int atronachHealth
EVENT OnEffectStart(Actor Target, Actor Caster)
selfRef = caster
2023-12-06 15:31:10 +00:00
;USKP 2.0.1 - Stop this from attaching to the player.
if( selfRef == Game.GetPlayer() )
Return
EndIf
;USKP 2.0.3 - 3D check, shaders, etc
if( selfRef.Is3DLoaded() )
AtronachFlameTrail.Play(selfRef, -1)
EndIf
ENDEVENT
Event OnEffectFinish(Actor akTarget, Actor akCaster)
AtronachFlameTrail.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("flame health > 0")
AtronachFlameTrail.Stop(selfRef)
AtronachUnsummonDeathFXS.Play(selfRef)
elseIf atronachHealth <= 0
wait(3.0)
; debug.trace("flame health <= 0")
AtronachFlameDeathFXS.Play(selfRef)
wait(0.5)
selfRef.placeAtMe(AtronachFlameDeathExplosion)
wait(0.1)
AtronachFlameTrail.Stop(selfRef)
selfRef.EquipItem(AtronachFlameDeadSkin)
wait(1)
AtronachFlameDeathFXS.Stop(selfRef)
endif
ENDEVENT