Author Topic: Dismount all players before starting a new module  (Read 318 times)

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dismount all players before starting a new module
« on: December 25, 2012, 12:53:07 pm »


                I need a script which goes on actions taken in the conversation that launches a new module (this is the easy part) but before that, dismounts all the players in the current one.
The PCs mess up when they enter the new module mounted, hence, I'd want to dismount them first.

Any idea on how this could be done?


Edit: And one more unrelated question - how can I change the message appearing in the death window (the one popping out when PC dies, in which buttons for loading, respawning or quiting are located)? I can't find anything that could be responsible for that in the default ondeath script.


Edit2: I created this script, which works just fine for single player, but would it work for all PCs on multi?

#include "x3_inc_horse"
void main()
{
  object oPC = GetFirstPC();
   while (GetIsObjectValid(oPC) == TRUE)
   {
      HorseInstantDismount(oPC);
      oPC = GetNextPC();
   }
  DelayCommand(1.0, StartNewModule("module"));
}


Ok, seems to be working (at least for two players). I came up with another script, which simply doesn't let start a new module unless no player is mounted or has a horse assigned but I guess this will be the same for both (GetFirstPC and GetNextPC).
               
               

               


                     Modifié par Grani, 25 décembre 2012 - 05:01 .
                     
                  


            

Legacy_Highv Priest

  • Full Member
  • ***
  • Posts: 170
  • Karma: +0/-0
Dismount all players before starting a new module
« Reply #1 on: December 26, 2012, 09:35:47 am »


               

Grani wrote...
Edit: And one more unrelated question - how can I change the message appearing in the death window (the one popping out when PC dies, in which buttons for loading, respawning or quiting are located)? I can't find anything that could be responsible for that in the default ondeath script.


It seemed to me you resolved your first issue on your own. As for the message appearing in the death window(I'm assuming you mean the GUI). It's actually hooked into PopUpDeathGUIPanel.(though you might not know it if you use PopUpGUIPanel(why this exists I have no idea, can we create our own GUI's????)). It's the sHelpString part.

Link to explain in full---> http://www.nwnlexico...UpDeathGUIPanel