The way I did this in my Vampirism Mod was to use a non-playable Item as a Token on the required NPC, and have that do a check for when the Character was dead:
Short DeathDoneRef TargetShort ResurrectTimerBegin GameMode Set Target to GetContainer If ( Target.GetDead == 1 ) If ( DeathDone == 0 ) Set ResurrectTimer to ( GetRandomPercent ) ; Makes it between 1-99 Set ResurrectTimer to ( ResurrectTimer * 100 ) ; Makes it between 100 and 9,900 EndIf EndIf If ( Target.GetItemCount [SpecialItem] >= 1 ) Return ; Stops the Rest of the Script from running EndIf If ( ResurrectTimer > 0 ) Set ResurrectTimer to ( ResurrectTimer - 1 ) EndIf If ( ResurrectTimer == 1 ) Target.Resurrect 1 EndIfEnd
This may not be the perfect way to do it, but it worked reliably for me-- it can easily be modified into a Script for an Actor. The other thing with this version is that it relies on an object being placed on the Corpse when exploring the body-- but that should be easy to modify, if you want to actually have to use it on them.
Hopefully this will help a little