Jump to content

Creation kit - resurrection spell help


tvanom

Recommended Posts

Hi,
I am currently trying to develop a resurrection spell that restores NPC's with their original inventory.
I have setup everything, and done a script for it, but I'm not sure what I'm doing wrong.

I have set it so my spell is 'Target actor'

Here is my script:


Scriptname testResurrect extends activemagiceffect

ObjectReference property resNPC auto

Event OnEffectFinish(Actor akTarget, Actor akCaster)
akTarget.Resurrect()
EndEvent

 

 

Every time I cast it on a dead npc, it does nothing to them, apart from cast some effects around them.

Any suggestions to what I'm doing wrong?

 

Thanks

 

 

Link to comment
Share on other sites

  • 3 years later...

"Resurrect is not a function or does not exist."

I'm trying to do the same thing, and that's what the compiler tells me.

I'm going to do a bit more research into it and see what I come up with.

 

EDIT: I found a script that passes compilation, apparently Resurrect needs a pre-made script to be imported before it'll work.

Here's my script:

 

Scriptname AAVampireResScript extends activemagiceffect  
import game
import utility
import debug

ObjectReference Property resNPC  Auto  

Event OnEffectFinish(Actor akTarget, Actor akCaster)
akTarget.Resurrect()
EndEvent

Haven't tested it yet, but hopefully it works.

Edited by Nightreign2
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...