Stopping npc health regeneration if restrained

Post » Sun Nov 18, 2012 9:17 am

I called SetRestrained() on an actor but now, if I hit him, he heals really fast. I assume he's treated like he's outside of combat, making him really hard to kill. If I comment the SetRestrained() line, he doesn't heal at all.

Is there a way to stop the healing process in a more definitive way? I already tried calling SetNoBleedoutRecovery(true) and ForceAV("HealRate",0), but had the same result.
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Sun Nov 18, 2012 1:16 am

Check out quest DA02. It involves sacrificing a follower. The PillarTrap method on the DA02Script, restrains the follower and then forces one of the quests aliases to point at him. The alias has a local even capture script that does an insta-kill onHit.

Dont know if you specifically want to be be able to kill people or if you want it to take longer than 1 hit. If so, you could also mark the Actor as essential which I believe also causes them to stop healing. THen in an OnHit handler, you could manually apply the damage.

Just one idea... there may be others that are simpler.... like paralyzing them with a spell effect or simply making them unconsicous instead of using SetRestrained. Or stting their actual health to 1, so a single hit would kill them without all the scripting.
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am


Return to V - Skyrim