Author Topic: No respawning in a module  (Read 314 times)

Legacy_MasterOFMorag

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
No respawning in a module
« on: February 23, 2012, 03:03:12 am »


               Hey all. I was just wondering if there's a script that will prevent people from respawning in a module.
Thanks in advance.
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
No respawning in a module
« Reply #1 on: February 23, 2012, 03:32:41 am »


               

MasterOFMorag wrote...

Hey all. I was just wondering if there's a script that will prevent people from respawning in a module.
Thanks in advance.


This command is used in the default on-death script.  It has parameters to disallow respawning and waiting for help.

void PopUpDeathGUIPanel(object oPC, int bRespawnButtonEnabled=TRUE, int bWaitForHelpButtonEnabled=TRUE, int nHelpStringReference=0, string sHelpString="")

EDIT: Looks like the standard on death uses PopUpGUIPanel() instead, a much more limiting command for the death panel.  Replace this command with the more flexible PopUpDeathGUIPanel().
               
               

               


                     Modifié par WhiZard, 23 février 2012 - 03:36 .
                     
                  


            

Legacy_MasterOFMorag

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
No respawning in a module
« Reply #2 on: February 23, 2012, 04:19:43 am »


               Thanks for the reply, but I've got a problem. When I compile the script it says this: ERROR: UNKNOWN STATE IN COMPILER
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
No respawning in a module
« Reply #3 on: February 23, 2012, 06:02:49 am »


               If you still want a window to pop up with default text you would use this:

DelayCommand(2.5, PopUpDeathGUIPanel(oPlayer,FALSE, TRUE, 66487));


You could also use the pop up with your own text. Something like so:

DelayCommand(2.5, PopUpDeathGUIPanel(oPlayer,FALSE, TRUE, 0, "You're dead sucka!"));

(Also note with the function "PopUpDeathGUIPanel", if it is a single player module you won't see the wait button. Only quit game or load game)


And then of course you could get rid of the pop up window all together and just let the player hit the escape key by getting rid of the line or I recommend just commenting it out:

//DelayCommand(2.5, PopUpDeathGUIPanel(oPlayer,FALSE, TRUE, 66487));


Hope it helps clear things up.
               
               

               


                     Modifié par GhostOfGod, 23 février 2012 - 08:59 .
                     
                  


            

Legacy_MasterOFMorag

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
No respawning in a module
« Reply #4 on: February 23, 2012, 07:49:13 pm »


               thanks or the feedback. It works perfectly!