Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.8 KiB
73 lines
1.8 KiB
3 months ago
|
Scriptname DraugrFXScriptEnderal extends ActiveMagicEffect
|
||
3 years ago
|
{Attaches and manages fx}
|
||
|
|
||
|
import utility
|
||
|
import form
|
||
|
|
||
|
;===============================================
|
||
|
|
||
|
Actor selfRef
|
||
|
ActorBase myActorBase
|
||
|
VisualEffect Property DraugrMaleEyeGlowFX Auto
|
||
|
VisualEffect Property DraugrFemaleEyeGlowFX Auto
|
||
|
|
||
3 years ago
|
EVENT OnEffectStart(Actor Target, Actor Caster)
|
||
|
selfRef = caster
|
||
3 years ago
|
|
||
3 years ago
|
;Added by USKP to prevent this effect from appearing on the player.
|
||
3 months ago
|
If selfRef == Game.GetForm(0x14)
|
||
3 years ago
|
selfRef = None
|
||
|
EndIf
|
||
|
If selfRef == None
|
||
|
Dispel()
|
||
|
return
|
||
|
EndIf
|
||
|
|
||
|
;USKP 2.0.3 - Don't bother with any of this if the dumb zombie isn't loaded!
|
||
|
If selfRef.Is3DLoaded()
|
||
|
myActorBase = selfRef.GetLeveledActorBase()
|
||
3 years ago
|
|
||
3 years ago
|
Int mySex = myActorBase.GetSex()
|
||
|
If (selfRef.GetSleepState() == 3)
|
||
|
; Debug.Trace("Draugr is sleeping! 3")
|
||
|
Elseif mySex == 0 ; If sex is male (only one currently working) play glow eye art
|
||
|
DraugrMaleEyeGlowFX.Play(selfRef, -1)
|
||
|
ElseIf mySex == 1 ; If sex is female (currently not returned) play debug text to say this is now working
|
||
|
DraugrFemaleEyeGlowFX.Play(selfRef, -1)
|
||
3 years ago
|
EndIf
|
||
3 years ago
|
EndIf
|
||
|
ENDEVENT
|
||
|
|
||
|
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 == None
|
||
|
Return
|
||
|
EndIf
|
||
3 years ago
|
|
||
3 years ago
|
; USKP 2.0.1 - Sanity check because the actorbase property isn't always valid when this runs.
|
||
|
If myActorBase
|
||
|
Int mySex = myActorBase.GetSex()
|
||
|
If mySex == 0
|
||
|
DraugrMaleEyeGlowFX.Play(selfRef, -1)
|
||
|
ElseIf mySex == 1
|
||
|
DraugrFemaleEyeGlowFX.Play(selfRef, -1)
|
||
|
EndIf
|
||
|
EndIf
|
||
|
EndEvent
|
||
|
|
||
|
Event OnDying(Actor myKiller)
|
||
|
utility.Wait(3.0)
|
||
|
StopEyes()
|
||
|
EndEvent
|
||
3 years ago
|
|
||
3 years ago
|
EVENT onDeath(actor myKiller)
|
||
|
StopEyes()
|
||
|
ENDEVENT
|
||
|
|
||
|
Function StopEyes()
|
||
|
if selfRef
|
||
3 years ago
|
DraugrMaleEyeGlowFX.Stop(selfRef)
|
||
|
DraugrFemaleEyeGlowFX.Stop(selfRef)
|
||
3 years ago
|
EndIf
|
||
|
EndFunction
|