4+ Gui Menus in a Row (For Comic Style Cinemas)
by Michael "Doodle" Golden · in Torque Game Builder · 08/19/2009 (11:16 pm) · 1 replies
Alright, So I've got my game of three levels pretty much complete. Only problem is, whenever I try to insert my Cinematic transitions inbetween the levels, I can never get past the second or third screen.
For example:
startTitleScreen();
}
function startcinema01()
{
Canvas.popDialog(TitleScreenGui);
stopMusic(TitleMusic, "", true);
Canvas.pushDialog(Cinema01gui);
}
function cinema02()
{
Canvas.popDialog(Cinema01gui);
Canvas.pushDialog(Cinema02gui);
}
function cinema03()
{
Canvas.popDialog(Cinema02gui);
Canvas.pushDialog(Cinema03gui);
}
function startfirstlevel()
{
stopMusic();
Canvas.popDialog(Cinema03gui);
hideCursor();
%level=expandFilename("~/data/levels/level01.t2d");
if( isFile( %level ) || isFile( %level @ ".dso"))
sceneWindow2D.loadLevel(%level);
}
The code starts the main menu out, (After starting the Game), then when you click the START button on the menu, takes you to Cinema01, which when you click on Cinema 01 takes you to Cinema 02. Problem is, when you click on Cinema02 to go to the third and final Cinema... it crashes without giving me a reason in the console.
Any ideas? D:
This is a project that is due tomorrow, but doesn't necessarily NEED the artwork inbetween levels. Although everything WOULD make a lot more sense.
Thanks. :)
For example:
startTitleScreen();
}
function startcinema01()
{
Canvas.popDialog(TitleScreenGui);
stopMusic(TitleMusic, "", true);
Canvas.pushDialog(Cinema01gui);
}
function cinema02()
{
Canvas.popDialog(Cinema01gui);
Canvas.pushDialog(Cinema02gui);
}
function cinema03()
{
Canvas.popDialog(Cinema02gui);
Canvas.pushDialog(Cinema03gui);
}
function startfirstlevel()
{
stopMusic();
Canvas.popDialog(Cinema03gui);
hideCursor();
%level=expandFilename("~/data/levels/level01.t2d");
if( isFile( %level ) || isFile( %level @ ".dso"))
sceneWindow2D.loadLevel(%level);
}
The code starts the main menu out, (After starting the Game), then when you click the START button on the menu, takes you to Cinema01, which when you click on Cinema 01 takes you to Cinema 02. Problem is, when you click on Cinema02 to go to the third and final Cinema... it crashes without giving me a reason in the console.
Any ideas? D:
This is a project that is due tomorrow, but doesn't necessarily NEED the artwork inbetween levels. Although everything WOULD make a lot more sense.
Thanks. :)
About the author
Associate Dave Calabrese
Cerulean Games
This really isn't a fun thing to fix. My recommendation would be to remove the direct object dependencies from the component, and either make the properties you are trying to acquire global fields in variables such as $GameData::MyCharactersSomething that can be checked from the engine, or find another way to do object lookup that does not require a direct object dependency.