Jump to content

Player Resurrection


Recommended Posts

after doing some tests I came up with this method : http://wiki.tesnexus.com/index.php/Resurrect_player

 

as I said , there are no side effects .

I don't lose the birthsign , level , spells etc

the camere is not set to the character's feet.

 

:thumbsup:

 

 

alex2avs

 

quick note : it doesn't work if fPlayerDeathReloadTime passed.

looking for a solution.

 

Article updated.

Edited by alex2avs
Link to comment
Share on other sites

Actually, there's an easier method of doing this, which is afaik foolproof. You create an OnHealthDamage Event Handler, like:

 

SetEventHandler "OnHealthDamage" RESOnHealthDamageByPlayerFunctionScript object::PlayerRef

 

and then code to check health and damage taken and do whatever you like to stop the player from dying, like:

 

Scn RESOnHealthDamageByPlayerFunctionScript

float mydamage
ref myattacker

Begin Function { mydamage myattacker }

if GetAV health <= ( mydamage * -1 )
ModAV health <whatever value here>
endif

Link to comment
Share on other sites

  On 6/6/2011 at 6:22 PM, Maskar said:

Actually, there's an easier method of doing this, which is afaik foolproof. You create an OnHealthDamage Event Handler, like:

 

SetEventHandler "OnHealthDamage" RESOnHealthDamageByPlayerFunctionScript object::PlayerRef

 

and then code to check health and damage taken and do whatever you like to stop the player from dying, like:

 

Scn RESOnHealthDamageByPlayerFunctionScript

float mydamage
ref myattacker

Begin Function { mydamage myattacker }

if GetAV health <= ( mydamage * -1 )
ModAV health <whatever value here>
endif

 

:thumbsup:

I used a method similar to yours (but not in OBSE) - in the first place.

The method above is only related to the resurrect function.

Link to comment
Share on other sites

Well, they're not really the same as the player character wouldn't die in my example. Just before that the Event Handler modifies the health so it doesn't actually happen. Also, your example wouldn't always work, as sometimes the player will not get the death animation, but instead return immediately to the menu. It does indeed require OBSE though.
Link to comment
Share on other sites

  On 6/6/2011 at 6:22 PM, Maskar said:

Actually, there's an easier method of doing this, which is afaik foolproof. You create an OnHealthDamage Event Handler, like:

 

SetEventHandler "OnHealthDamage" RESOnHealthDamageByPlayerFunctionScript object::PlayerRef

This wouldn't work if you die by kill function...

Link to comment
Share on other sites

  On 6/6/2011 at 8:14 PM, troybayliss said:
  On 6/6/2011 at 6:22 PM, Maskar said:

Actually, there's an easier method of doing this, which is afaik foolproof. You create an OnHealthDamage Event Handler, like:

 

SetEventHandler "OnHealthDamage" RESOnHealthDamageByPlayerFunctionScript object::PlayerRef

This wouldn't work if you die by kill function...

 

Under what conditions would that be used on the player?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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