Event OnEffectStart(Actor akTarget, Actor akCaster) Summon(akCaster, MyNPC)EndEventFunction Summon(ObjectReference akSummoner = None, ObjectReference akSummon = None, Float afDistance = 150.0, Float afZOffset = 0.0, ObjectReference arPortal = None, Int aiStage = 1) While aiStage &--#60; 6 aiStage += 1 If aiStage == 1 ; Shroud summon with portal arPortal = akSummon.PlaceAtMe(Game.GetForm(0x0007CD55)) ; SummonTargetFXActivator disables and deletes itself ElseIf aiStage == 2 ; Disable Summon akSummon.Disable() ElseIf aiStage == 3 ; Move portal in front of summoner arPortal.MoveTo(akSummoner, Math.Sin(akSummoner.GetAngleZ()) * afDistance, Math.Cos(akSummoner.GetAngleZ()) * afDistance, afZOffset) ElseIf aiStage == 4 ; Move summon to portal akSummon.MoveTo(arPortal) ElseIf aiStage == 5 ; Enable summon as the portal dissipates akSummon.Enable() EndIf Utility.Wait(0.6) EndWhileEndFunction
I have successfully compiled the script (put myNPC as an Actor property) and the spell shows up in game. But the spell doesn't summon the NPC, it plays the summon vfx and then ends.
Help?
edit: for clarification the magic effect is set up as a 'script' effect, and it shows up ingame, so the problem probably has to with the script and not the spell itself.