Another noob to NWN2 problem here.
Trying to use the OnPlayerRespawn event and can't get it to work.
I've discovered that there is a script being run off the button of the default OnDeath GUI panel that pops up when a player dies. This script is what handles the respawning? I don't know anything about scripting GUIs yet. All I want is to be able to use the Module event "OnPlayerRespawn".
So when a player dies...they click respawn...my respawn script in the OnPlayerRespawn fires.
Does this event even still work?
All help very much appreciated.
OnPlayerDeath OnPlayerRespawn issues
Débuté par
GhostOfGod
, mars 26 2011 04:51
#1
Posté 26 mars 2011 - 04:51
#2
Posté 26 mars 2011 - 05:47
hi GoG,

here's a bit of code for use in onPlayerDeath that calls up a GUI box:
It's been a while since i worked on this, and my code is a mess. "gui_kg_mod_respawn" is the script that raises PC, jumps to respawn pt, applies penalties ..
no.Does this event even still work?
here's a bit of code for use in onPlayerDeath that calls up a GUI box:
DisplayMessageBox(oPC, 0, GetStringByStrRef(181408), "gui_kg_mod_respawn", "", FALSE, "", 6603, "not OK", 0, "");
It's been a while since i worked on this, and my code is a mess. "gui_kg_mod_respawn" is the script that raises PC, jumps to respawn pt, applies penalties ..
#3
Posté 26 mars 2011 - 06:45
Awesome. Thanks kevl. That did the trick. Took me a few to realize that I needed to define the spawner as OBJECT_SELF in the script and not the respawn button presser but that is exactly what I needed. To bad it had to be another big change like that from NWN1. Confusing for people who switch over.
#4
Posté 26 mars 2011 - 12:12
The onrespawn event doesn't work, but you can add your changes to the gui script that is fired when players hit the respawn button.
#5
Posté 26 mars 2011 - 06:59
oops, sorry bout that GoG - like i say, my code is a mess .. it's still in the state it was when I read the footnote on p.591 ...........
( tks for the backup / confirmation, dethia )
( tks for the backup / confirmation, dethia )





Retour en haut







