Start up gui where im i going wrong?
by James Bond · in Torque Game Engine · 12/19/2004 (5:07 am) · 12 replies
I changed the code in client/ui/startup.gui
too...
///////////////////////////////////////////////////////////////////////
new GuiFadeinBitmapCtrl(StartupGui1) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./GarageGames";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
new GuiFadeinBitmapCtrl(StartupGui2) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./bblogo";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
new GuiFadeinBitmapCtrl(StartupGui3) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./ckrloglo";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
function StartupGui1::click()
{
StartupGui1.done = true;
}
function StartupGui2::click()
{
StartupGui2.done = true;
}
function StartupGui3::click()
{
StartupGui3.done = true;
}
function loadStartup1()
{
StartupGui1.done = false;
Canvas.setContent( StartupGui1 );
schedule(100, 0, checkStartup1Done );
alxPlay(AudioStartup);
}
function loadStartup2()
{
StartupGui2.done = false;
Canvas.setContent( StartupGui2 );
schedule(100, 0, checkStartup2Done );
alxPlay(AudioStartup);
}
function loadStartup3()
{
StartupGui3.done = false;
Canvas.setContent( StartupGui3 );
schedule(100, 0, checkStartup3Done );
alxPlay(AudioStartup);
}
function checkStartup1Done()
{
if (StartupGui1.done)
{
echo ("*** Load bubble logo");
loadStartupGui2();
}
else
schedule(100, 0, checkStartup1Done );
}
function checkStartup2Done()
{
if (StartupGui2.done)
{
echo ("*** Load CKR logo");
loadStartupGui2();
}
else
schedule(100, 0, checkStartup2Done );
}
function checkStartup3Done()
{
if (StartupGui3.done)
{
echo ("*** Load Main Menu");
loadMainMenu();
}
else
schedule(100, 0, checkStartup3Done );
}
I want the three logos to appere one after the other then bring up the main menu.
However this is not wrking i just get a black window and the mouse icon screws up?
anyone?
Thanks,
James B.
too...
///////////////////////////////////////////////////////////////////////
new GuiFadeinBitmapCtrl(StartupGui1) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./GarageGames";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
new GuiFadeinBitmapCtrl(StartupGui2) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./bblogo";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
new GuiFadeinBitmapCtrl(StartupGui3) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./ckrloglo";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
function StartupGui1::click()
{
StartupGui1.done = true;
}
function StartupGui2::click()
{
StartupGui2.done = true;
}
function StartupGui3::click()
{
StartupGui3.done = true;
}
function loadStartup1()
{
StartupGui1.done = false;
Canvas.setContent( StartupGui1 );
schedule(100, 0, checkStartup1Done );
alxPlay(AudioStartup);
}
function loadStartup2()
{
StartupGui2.done = false;
Canvas.setContent( StartupGui2 );
schedule(100, 0, checkStartup2Done );
alxPlay(AudioStartup);
}
function loadStartup3()
{
StartupGui3.done = false;
Canvas.setContent( StartupGui3 );
schedule(100, 0, checkStartup3Done );
alxPlay(AudioStartup);
}
function checkStartup1Done()
{
if (StartupGui1.done)
{
echo ("*** Load bubble logo");
loadStartupGui2();
}
else
schedule(100, 0, checkStartup1Done );
}
function checkStartup2Done()
{
if (StartupGui2.done)
{
echo ("*** Load CKR logo");
loadStartupGui2();
}
else
schedule(100, 0, checkStartup2Done );
}
function checkStartup3Done()
{
if (StartupGui3.done)
{
echo ("*** Load Main Menu");
loadMainMenu();
}
else
schedule(100, 0, checkStartup3Done );
}
I want the three logos to appere one after the other then bring up the main menu.
However this is not wrking i just get a black window and the mouse icon screws up?
anyone?
Thanks,
James B.
About the author
#2
I tryied this out, however I still get just a black screen, I also changed the scedule thingy but this had no inpact.
Any other ideas?
this is doing my nut in now.
thanks,
-James B.
12/19/2004 (8:22 am)
Hi, DavideI tryied this out, however I still get just a black screen, I also changed the scedule thingy but this had no inpact.
Any other ideas?
this is doing my nut in now.
thanks,
-James B.
#3
I think you must separate them to be 3 kind of Guis.
Make a new startupGui2.gui and add most things in you code from the
second gui scripts ,and when the first gui is done point at the second gui and so on.
Like this
first gui
12/19/2004 (10:52 am)
@JamesI think you must separate them to be 3 kind of Guis.
Make a new startupGui2.gui and add most things in you code from the
second gui scripts ,and when the first gui is done point at the second gui and so on.
Like this
first gui
new GuiFadeinBitmapCtrl(StartupGui) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./GarageGames";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
//--- OBJECT WRITE END ---
function loadStartup()
{
StartupGui.done = false;
Canvas.setContent( StartupGui );
schedule(100, 0, checkStartupDone );
alxPlay(AudioStartup);
}
//-------------------------------------
function StartupGui::click()
{
StartupGui.done = true;
}
//-------------------------------------
function checkStartupDone()
{
if (StartupGui.done)
{
echo ("*** Load Main Menu");
loadStartup2();
}
else
schedule(100, 0, checkStartupDone );
}and the second one//--- OBJECT WRITE BEGIN ---
new GuiFadeinBitmapCtrl(StartupGui2) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./Racing";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
//--- OBJECT WRITE END ---
function loadStartup2()
{
StartupGui2.done = false;
Canvas.setContent( StartupGui2 );
schedule(100, 0, checkStartupDone2 );
alxPlay(AudioStartup);
}
//-------------------------------------
function StartupGui2::click()
{
StartupGui2.done = true;
}
//-------------------------------------
function checkStartupDone2()
{
if (StartupGui2.done)
loadMainMenu();
else
schedule(100, 0, checkStartupDone2 );
}Dont forget to exec the second gui in client.cs
#4
12/20/2004 (1:17 am)
If you get a black screen, ths probably means that the gui ins't loaded correctly. Check the console to see if there are errors
#5
Thankyou very much this worked just as I needed it to do thank you.
-James B.
12/28/2004 (11:13 am)
Billy,Thankyou very much this worked just as I needed it to do thank you.
-James B.
#6
using your technique, this doesn't work unless I had a second loadstartup(); because the console reveals that it can't find the loadstartup2();
I'm not a coder, which is why I don't want to mess with the code, althoguh I know what would need to be done, I don't want to add a loadstartup2(); until my coders are ready...
Toby.
01/14/2005 (10:17 am)
Billy,using your technique, this doesn't work unless I had a second loadstartup(); because the console reveals that it can't find the loadstartup2();
I'm not a coder, which is why I don't want to mess with the code, althoguh I know what would need to be done, I don't want to add a loadstartup2(); until my coders are ready...
Toby.
#7
Thats why its called startup and startup2 or what ever you choose .
01/14/2005 (12:06 pm)
You cant have 2 functions called the same name.Thats why its called startup and startup2 or what ever you choose .
#8
Toby.
01/14/2005 (12:49 pm)
Oh yeah I knew that, but I guess now the question is where is the startup function? which file..Toby.
#10
.gui
Many a times I've seen this done.
08/15/2007 (7:02 am)
TIP: becareful when saving your GUI file, if you keep getting a blank screen for the second splash screen, this may be down to the fact that you used notepad and its saved the gui file as a .txt extension instead of .gui, when saving a new gui file in notepad, make sure you have all files selected as the file type, then type Many a times I've seen this done.
#11
Im getting the error "Unable to find function loadStartup2"
I tried adding it in the init.cs but im new and not to sure what to put there. I found loadstartup(); but what do I do then? sorry I been searching the boards and it keeps bringing me back here.
02/27/2009 (10:13 pm)
Sorry for bringing up an old one but need help.Im getting the error "Unable to find function loadStartup2"
I tried adding it in the init.cs but im new and not to sure what to put there. I found loadstartup(); but what do I do then? sorry I been searching the boards and it keeps bringing me back here.
#12
If 'starter.fps':
A splashscreen should already be working. If not, please explain more of the problem.
If 'tutorial.base':
I strongly recommend this thread (with thanks from Michael Hall):
Click Here. Be sure to read through all of the posts. You can skip the main forumn post. To save you some reading,Post #20 of that thread might be what your looking for.
02/28/2009 (7:24 am)
What folder are you using? 'tutorial.base' or 'starter.fps'?If 'starter.fps':
A splashscreen should already be working. If not, please explain more of the problem.
If 'tutorial.base':
I strongly recommend this thread (with thanks from Michael Hall):
Click Here. Be sure to read through all of the posts. You can skip the main forumn post. To save you some reading,Post #20 of that thread might be what your looking for.
Torque Owner Davide Archetti
Default Studio Name
function checkStartup1Done() { if (StartupGui1.done) { echo ("*** Load bubble logo"); loadStartupGui2(); } else [b] { StartupGui1.done = true; [/b] schedule(100, 0, checkStartup1Done ); [b] } [/b] }Do the same for all the others functions
Also in the schedule function, 100 means 100ms, 0.1 sec, perhaps it's too fast :)