I am trying to figure out a script that would cause an npc to spawn when they are killed by a certain damage over time spell
I have tried to assign this script to a spell but it's not working
---
Scriptname Spawner extends ObjectReference
ACTORBASE PROPERTY wolf AUTO
ACTORBASE PROPERTY boss AUTO
INT PROPERTY numToPlace AUTO
OBJECTREFERENCE wolfStore1
OBJECTREFERENCE wolfStore2
OBJECTREFERENCE wolfStore3
OBJECTREFERENCE wolfStore4
Event OnDeath(Actor akTarget, Actor akCaster)
IF(numToPlace == 5)
wolfStore1 = placeAtMe(boss)
Debug.Trace("npc spawned")
numtoplace = 6
Disable()
ENDIF
endEVENT
---
appreciate the help!