2023-12-04 15:02:58 +00:00
|
|
|
Scriptname SprigganSwarmActorSCRIPT extends ActiveMagicEffect conditional
|
|
|
|
{Attaches and manages witchlights's fx}
|
|
|
|
;======================================================================================;
|
|
|
|
; IMPORTS /
|
|
|
|
;=============/
|
|
|
|
import utility
|
|
|
|
import form
|
|
|
|
import game
|
|
|
|
;======================================================================================;
|
|
|
|
; PROPERTIES /
|
|
|
|
;=============/
|
|
|
|
VisualEffect Property SprigganSwarmFXAttachEffect Auto
|
|
|
|
objectReference property mySprigganSwarm auto conditional hidden
|
|
|
|
actorBase property SprigganSwarmBase auto
|
|
|
|
|
|
|
|
;======================================================================================;
|
|
|
|
; VARIABLES /
|
|
|
|
;=============/
|
|
|
|
ObjectReference selfRef
|
|
|
|
|
|
|
|
;======================================================================================;
|
|
|
|
; EVENTS /
|
|
|
|
;=============/
|
|
|
|
|
|
|
|
EVENT OnEffectStart(Actor Target, Actor Caster)
|
|
|
|
|
|
|
|
|
|
|
|
selfRef = caster
|
2023-12-06 15:31:10 +00:00
|
|
|
|
|
|
|
;Added by USKP to prevent this effect from appearing on the player.
|
|
|
|
If selfRef == Game.GetPlayer()
|
|
|
|
Dispel()
|
|
|
|
return
|
|
|
|
EndIf
|
|
|
|
|
2023-12-04 15:02:58 +00:00
|
|
|
selfRef.RegisterForSingleUpdate(0.25)
|
|
|
|
int i = 10 ; recursion limiter for 3dLoaded check
|
|
|
|
while selfRef.is3dLoaded() == FALSE
|
|
|
|
; wait for onLoad() to complete
|
|
|
|
; too costly ???
|
|
|
|
if i >= 10
|
|
|
|
; debug.trace("Recursion of limit ("+i+") hit by: "+self)
|
|
|
|
return
|
|
|
|
else
|
|
|
|
i+=1
|
|
|
|
; debug.trace("While() recursion ("+i+")")
|
|
|
|
endif
|
|
|
|
endWhile
|
|
|
|
; only attack FX once the3D is loaded
|
|
|
|
SprigganSwarmFXAttachEffect.Play(selfRef, -1)
|
|
|
|
|
|
|
|
ENDEVENT
|
|
|
|
|
|
|
|
|
|
|
|
EVENT onDeath(actor myKiller)
|
|
|
|
|
|
|
|
SprigganSwarmFXAttachEffect.Stop(selfRef)
|
|
|
|
|
|
|
|
ENDEVENT
|