alex2avs Posted June 6, 2011 Share Posted June 6, 2011 (edited) 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 etcthe 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 June 6, 2011 by alex2avs Link to comment Share on other sites More sharing options...
Maskar Posted June 6, 2011 Share Posted June 6, 2011 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 More sharing options...
alex2avs Posted June 6, 2011 Author Share Posted June 6, 2011 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 More sharing options...
Maskar Posted June 6, 2011 Share Posted June 6, 2011 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 More sharing options...
troybayliss Posted June 6, 2011 Share Posted June 6, 2011 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::PlayerRefThis wouldn't work if you die by kill function... Link to comment Share on other sites More sharing options...
Maskar Posted June 6, 2011 Share Posted June 6, 2011 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::PlayerRefThis 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 More sharing options...
troybayliss Posted June 6, 2011 Share Posted June 6, 2011 Execution Point in SE, falls into the void in some quests, others added by mods... Link to comment Share on other sites More sharing options...
Maskar Posted June 6, 2011 Share Posted June 6, 2011 That does indeed make it not 100% foolproof. The kill function seems something that's currently not properly covered using Event Handlers. Maybe something for OBSE 21. Link to comment Share on other sites More sharing options...
Recommended Posts