Game Development Community

Multiple splash screens "click to bypass" problem.

by Mike Rowley · in Torque Game Engine · 11/12/2006 (6:56 am) · 3 replies

I've been working on adding multiple splash screens to my game, and have succeeded. Everything works like it's supposed to, but I can't get the splash to disapear if you click your mouse.

I tried to copy the way Ken Finney did it in 3dgap1, but it now just skips the whole splash.

Here's some code:
in splash3Gui.gui
new GuiTheoraCtrl(Startup3Gui) {
   Profile = "GuiDefaultProfile";
   HorizSizing = "right";
   VertSizing = "bottom";
   position = "0 0";
   Extent = "640 480";
   MinExtent = "8 2";
   Visible = "1";
   theoraFile = "./exploreIntro.ogg";
   done = "0";
   stopOnSleep = "0";
   backgroundColor = "0 0 0 255";
   
      new GuiInputCtrl(SplashScreenInputCtrl) {
      profile = "GuiInputCtrlProfile";
      position = "0 0";
      extent = "10 10";
};
};

and in client/init.cs
function loadMainMenu()
{
   // Startup the client with the Main menu...
   Canvas.setContent( MainMenuGui );


   // Make sure the audio initialized.
   if($Audio::initFailed) {
      MessageBoxOK("Audio Initialization Failed", 
         "The OpenAL audio system failed to initialize.  " @
         "You can get the most recent OpenAL drivers <a:www.garagegames.com/docs/torque/gstarted/openal.html>here</a>.");
   }

   Canvas.setCursor("DefaultCursor");
}

  function SplashScreenInputCtrl::onInputEvent(%this, %dev, %evt, %make)
{
   if(%make)
   {
     loadMainMenu();
   }
}

I am getting no errors in the console log.
Any clue what I'm doing wrong?
The theora splash works without the SplashScreenInputCtrl, but I can't bypass it.
I'm trying to set this up so that people don't have to keep watching the 30 sec video each time they play the game. Just click to bypass.
Thanks for any help.

#1
11/12/2006 (7:06 am)
I made a thread on this way back when and it demonstrates a fully working one.
#2
11/12/2006 (7:27 am)
I saw that. I'm going to give it a try, and if that doesn't work, I may overlay a button to skip.
Thanks.
#3
11/12/2006 (7:53 am)
I added a button to skip the video. Works great...eccept....the sound continues to play. :-D
I'm going to have to add some code in to tell it to stop the sound. :D
Thanks for your help.