The Elder Scrolls V: Skyrim

The Elder Scrolls V: Skyrim

Find the best mods for your game
Finding and installing your favorite mods is easier than ever before. Mod-makers also enjoy a streamlined process for uploading mods directly to Steam. Click here to learn how.
Can't make my npc raise from dead
Hello, o' so reliable skyrim community. I came here with another question here.

I'm trying to make a npc that when you loot a specific item from It, the npc gets revived (kind of like how the Reanimation spell works). The problem is, I can't seem to make that work.

I created a custom spell and magic effect to try making the revive work, but I don't even know if it is being used. I tried using "DoCombatSpellApply" command to see if I can make the npc use the skill on himself (because It's a self skill), and It doesn't works. I also tried making a dummy npc appear at the npc skill, and try using the skill using the same command above (but this time, with the spell effect being targeted actor effect). and It doesn't works either.

I thought It was because the script wasn't working due to triggering the script while in the inventory, so I did the trick of Utility.Wait(0.01) to see if the script functions correctly after I close the inventory... And It doesn't.

The OnItemRemoved trigger on the npc is working correctly, because the debug message for when taking the item is showing, but making the npc be revived by a spell effect is being the problem.

Oh yeah, my npc isn't marked as Dead on Spawn or something in the map.

Edit:. Oh, and I thought about the possibility of running the script after I closed the inventory, until I figured out that OnClose event does nothing...
Last edited by なかの31; 7 Aug, 2021 @ 12:05pm