2021-10-05 22:22:24 +00:00
|
|
|
Scriptname DraugrFXScript extends ActiveMagicEffect
|
2021-10-05 22:15:58 +00:00
|
|
|
{Attaches and manages fx}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import utility
|
|
|
|
import form
|
|
|
|
|
|
|
|
;===============================================
|
|
|
|
|
|
|
|
Actor selfRef
|
|
|
|
ActorBase myActorBase
|
2021-10-05 22:22:24 +00:00
|
|
|
int draugrSex
|
2021-10-05 22:15:58 +00:00
|
|
|
VisualEffect Property DraugrMaleEyeGlowFX Auto
|
|
|
|
VisualEffect Property DraugrFemaleEyeGlowFX Auto
|
|
|
|
|
2021-10-05 22:22:24 +00:00
|
|
|
EVENT OnEffectStart(Actor Target, Actor Caster)
|
|
|
|
selfRef = caster
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-05 22:22:24 +00:00
|
|
|
;Added by USKP to prevent this effect from appearing on the player.
|
|
|
|
If selfRef == Game.GetPlayer()
|
|
|
|
Dispel()
|
|
|
|
return
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
2021-10-05 22:22:24 +00:00
|
|
|
|
|
|
|
;USKP 2.0.3 - Don't bother with any of this if the dumb zombie isn't loaded!
|
|
|
|
if( selfRef.Is3DLoaded() )
|
|
|
|
myActorBase = caster.GetLeveledActorBase()
|
|
|
|
;If sex is male (only one currently working) play glow eye art
|
|
|
|
if myActorBase.GetSex() == 0
|
|
|
|
if (selfRef.GetSleepState() == 3)
|
|
|
|
; Debug.Trace("Draugr man is sleeping! 3")
|
|
|
|
else
|
|
|
|
;Play glow art
|
|
|
|
DraugrMaleEyeGlowFX.Play(selfRef, -1)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
;if sex is female (currently not returned) play debug text to say this is now working
|
|
|
|
if myActorBase.GetSex() == 1
|
|
|
|
if (selfRef.GetSleepState() == 3)
|
|
|
|
; Debug.Trace("Draugr fem is sleeping! 3")
|
|
|
|
else
|
|
|
|
DraugrFemaleEyeGlowFX.Play(selfRef, -1)
|
|
|
|
endIf
|
|
|
|
endif
|
|
|
|
EndIf
|
|
|
|
ENDEVENT
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-05 22:22:24 +00:00
|
|
|
Event OnGetUp(ObjectReference akFurniture)
|
|
|
|
; Debug.Trace("Draugr just got up from " )
|
|
|
|
;Added by USKP to prevent this effect from appearing on the player.
|
|
|
|
if( selfRef == Game.GetPlayer() )
|
|
|
|
Dispel()
|
|
|
|
Return
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
2021-10-05 22:22:24 +00:00
|
|
|
|
|
|
|
; USKP 2.0.1 - Sanity check because the actorbase property isn't always valid when this runs.
|
|
|
|
if( myActorBase )
|
|
|
|
if myActorBase.GetSex() == 0
|
|
|
|
;Play glow art
|
|
|
|
DraugrMaleEyeGlowFX.Play(selfRef, -1)
|
|
|
|
endif
|
|
|
|
;if sex is female (currently not returned) play debug text to say this is now working
|
|
|
|
if myActorBase.GetSex() == 1
|
|
|
|
DraugrFemaleEyeGlowFX.Play(selfRef, -1)
|
|
|
|
endif
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
EVENT onDeath(actor myKiller)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
DraugrMaleEyeGlowFX.Stop(selfRef)
|
|
|
|
DraugrFemaleEyeGlowFX.Stop(selfRef)
|
2021-10-05 22:22:24 +00:00
|
|
|
|
|
|
|
ENDEVENT
|