I know there is a simple solution - I just don't remember what it is.
Thanks
How To Stop The Respawn Button After PC Death
Débuté par
Morbane
, sept. 17 2011 09:43
#1
Posté 17 septembre 2011 - 09:43
#2
Posté 17 septembre 2011 - 05:47
I think you can just alter the OnDeath script to suit your needs.
#3
Posté 18 septembre 2011 - 02:03
I made a custom UI and just took out the XML code that made the respawn button. Works great. If you want it, let me know.
#4
Posté 18 septembre 2011 - 07:05
M. Rieder - I would like that - thanks for the offer!
PM me
PM me
#5
Posté 18 septembre 2011 - 12:42
Morbane, what exactly do you want to happen when the player dies? As Fred stated, you could just write a custom OnPlayerDeath script. For example, I have one area that when the player dies, they are instead considered captured. So my script checks the tag of the area the player is in. If it is correct, I jump them to a prison cell, else (they are is some other area) execute the default OnPlayerDeath script.
#6
Posté 18 septembre 2011 - 01:32
Morbane, what exactly do you want to happen when the player dies?
I want no respawn button to appear.
#7
Posté 18 septembre 2011 - 01:39
But you do want the Death GUI to appear? Can't you just turn off the respawn button via script? It's supposed to support permanent deaths and things.
#8
Posté 18 septembre 2011 - 05:59
I remember trying to script it an was unable to with NWScript. Of course that does not mean it cannot be done, but I decided to resort to xml scripting and I was able to do it that way. If there is an NWScript way to do it, I would be interested.
#9
Posté 18 septembre 2011 - 06:08
Ha ha ha! This is what happens when you spend over a year on a project. I just went looking for my custom xml document and coulldn't find it. So I looked at my death script and it turns out I did us NWScript to disable the respawn button!
Here's the code:
void GUI()
{
DisplayGuiScreen(GetFirstPC(),"SCREEN_PARTY_DEATH",FALSE);
SetGUIObjectDisabled(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_RESPAWN",TRUE);
SetGUIObjectHidden(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_RESPAWN",TRUE);
SetGUIObjectDisabled(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_WAIT_FOR_HELP",TRUE);
SetGUIObjectHidden(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_WAIT_FOR_HELP",TRUE);
}
The above function will display the death screen without the "respawn" button. Just put it into your death script and you should be good to go.
Here's the code:
void GUI()
{
DisplayGuiScreen(GetFirstPC(),"SCREEN_PARTY_DEATH",FALSE);
SetGUIObjectDisabled(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_RESPAWN",TRUE);
SetGUIObjectHidden(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_RESPAWN",TRUE);
SetGUIObjectDisabled(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_WAIT_FOR_HELP",TRUE);
SetGUIObjectHidden(GetFirstPC(),"SCREEN_PARTY_DEATH","BUTTON_WAIT_FOR_HELP",TRUE);
}
The above function will display the death screen without the "respawn" button. Just put it into your death script and you should be good to go.
#10
Posté 18 septembre 2011 - 06:09
Note:
I use GetFirstPC() as the identifier here. You should not do that. You should use
GetLastPlayerDied();
I use GetFirstPC() as the identifier here. You should not do that. You should use
GetLastPlayerDied();
#11
Posté 18 septembre 2011 - 08:29
Hmm, I thought you would be able to use the old NWN1 death GUI function, but I guess that works just as well (and it would be doing the same thing anyway).





Retour en haut







