end deferredkill but stay with out dying?

Post » Fri Feb 14, 2014 3:42 am

I read this on the Wiki in the discussion tab for the deferredkill function:

Is there a way to bring an actor out of the deferredkill state after their health has gone below 0 and then restored back up to full without killing them?

No one had an answer there, anyone here know?

User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Fri Feb 14, 2014 1:54 am

Make them essential instead with bleedout override set to 0?
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am

Post » Fri Feb 14, 2014 10:30 am

This isn't going to help, but I just ran a few tests on it. EndDeferredKill() seems to kill them anyway, even if you call Resurrect before hand(they will resurrect, and then die when EndDeferredKill is called). RestoreActorValue("health", someHP) is totally ignored while in a DeferredKill state and their hp has gone below 0(when the bar disappears). Me thinks, EndDeferredKill is going to make this difficult.

Edit: Shroob suggestion works. :)

User avatar
Kaylee Campbell
 
Posts: 3463
Joined: Mon Mar 05, 2007 11:17 am

Post » Fri Feb 14, 2014 1:31 pm

Deferred kill is used in only one place -- Harkon's boss fight in Dawnguard -- and it works within a very narrow purpose: you're going to be killing this actor anyway, but we need to do something before the actual death that can't be done with the NPC dead.
User avatar
K J S
 
Posts: 3326
Joined: Thu Apr 05, 2007 11:50 am

Post » Fri Feb 14, 2014 5:55 am

Unfortunately this is for the player not an NPC so set essential will not work (will not work on the player). :confused:

Neither would set invulnerable nor protected. Only DeferredKill works to actually prevent the player from dying in a kill move. Actually EVEN GOD MODE would not stop a kill move :eek:
But thank you very much for your time Terra Nova and PrinceShroob and for trying to help.
Maybe the SKSE team can remove this state without killing the actor?
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Fri Feb 14, 2014 2:04 pm

The player can be essential if they are held in an alias that is flagged as essential -- see brawling.
User avatar
Lady Shocka
 
Posts: 3452
Joined: Mon Aug 21, 2006 10:59 pm

Post » Fri Feb 14, 2014 10:49 am

mmmmm... so you are saying to drop the player in and out of such an alias via my script, I wonder if I can use the brawling alias rather than make my own. I would just "borrow it" for a short time during my scripts run, sort of...

Thanks! :thumbsup:

BTW : what is the lines of script that would place the player in the alias (I have never done this via scripting).

Here is what I think I need to do:

aadpEssentialPlayerAlias.ForceRefTo(Playerref)

And then

aadpEssentialPlayerAlias.Clear()

But this needs to run in a magic effect script and I get this error: "ForceRefTo is not a function or does not exist"

I think this means I cannot use the function in the magic effect script because the function is for Alias Script. :ermm:

User avatar
Antony Holdsworth
 
Posts: 3387
Joined: Tue May 29, 2007 4:50 am

Post » Fri Feb 14, 2014 10:04 am

What about calling it in a stage fragment instead?

like if the effect hits the player, set the stage with forcerefto call.

User avatar
chinadoll
 
Posts: 3401
Joined: Tue Aug 22, 2006 5:09 am

Post » Fri Feb 14, 2014 3:07 am

HEY, ForceRefto is used int he MGRAppBSpell2EffectScript.psc magic effect script!!!??

So why am I getting an error message?

I GOT IT:

ReferenceAlias Property

I was using

Alias Property

User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm


Return to V - Skyrim