Scriptname aaaUDSummonDeleteScript extends Actor  

VisualEffect property aaaUDSummonSpectralDragonVFX auto
MagicEffect property aaaUDDragonAIEffect auto

Event Onload()
	aaaUDSummonSpectralDragonVFX .Play(self)
EndEvent

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
	if akEffect == aaaUDDragonAIEffect 
		debug.notification("dispel")
		self.DispelAllSpells()
	endif
EndEvent

Event OnDying(Actor akKiller)
	self.Disable()
	self.Delete()
EndEvent