Die and Spawn an NPC

Post » Thu Apr 04, 2013 11:24 pm

Hi

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!
User avatar
Wayne W
 
Posts: 3482
Joined: Sun Jun 17, 2007 5:49 am

Return to V - Skyrim