» Fri Apr 09, 2010 6:22 am
What you need is a script that makes an activator cast the reanimate spell on each dead npc in your vicinity.
This http://cs.elderscrolls.com/constwiki/index.php/Casting_Spells_From_An_Activator takes you to a guide that teaches how to do just that. Basically you need to create two scripts one attached to a self cast spell an another that moves an activator (the same activator) to each dead npc and makes it cast a reanimate spell on each of this npcs, one at a time. But dont worry, while the spell is cast on each npc in succession in-game it appears as if the spell was cast simultaneously on each. Its way more simple than it sounds once you get the hang of it. Everything is detailed in the guide i linked, CS wiki is your friend.
The command you'll be using is:
ActivatorRef.MoveTo DeadNpcRef 0, 0, 0 (where 0, 0, 0 refers to the x, y ,z distance relative to the DeadNpcRef)
ActivatorRef.Cast ReanimateSpell DeadNpcRef (this basically says that the activator is going to cast the reanimate spell on the deadnpc...... make sure the spell is set to cast on target and not on touch, i think activators cant cast touch spell, someone correct me if i am wrong.)
to check if the npc is actually dead you will need to use an if block with this condition: If (DeadNpcRef.GetDead == 1)