Extending the Load Screen.
by Drew Madsen · in Torque Game Engine · 11/20/2009 (10:36 am) · 3 replies
How do I prevent the game from popping the load screen gui after loading?
I am aiming to get the game to continue adding the character and continue loading the level while the loading screen is still set. Then have a status bar that tracks the number of objects on the mis once they are all present, it pops the gui.
I've been looking all over and can not find where in the scripts it pops.
I've tried canvas.setcontent(loadinggui); after the load, but it will show the load screen for a moment then pop for no apparent reason. With some timing I can get it to work but its very iffy and not 100% reliable.
I assume it has to do with were the GUI is initially being popped from for the loading gui.
I am aiming to get the game to continue adding the character and continue loading the level while the loading screen is still set. Then have a status bar that tracks the number of objects on the mis once they are all present, it pops the gui.
I've been looking all over and can not find where in the scripts it pops.
I've tried canvas.setcontent(loadinggui); after the load, but it will show the load screen for a moment then pop for no apparent reason. With some timing I can get it to work but its very iffy and not 100% reliable.
I assume it has to do with were the GUI is initially being popped from for the loading gui.
About the author
#2
11/20/2009 (11:47 am)
I think that I what I'm looking for. I want to extend the loading screen so that the server has time to populate all the objects on the screen before going to the play gui.
Torque Owner Richard Preziosi
WinterLeaf Entertainment
function GameConnection::initialControlSet(%this) { echo ("*** Initial Control Object"); // The first control object has been set by the server // and we are now ready to go. // first check if the editor is active if (!Editor::checkActiveLoadDone()) { if (Canvas.getContent() != PlayGui.getId()) Canvas.setContent(PlayGui); } }I'm not understanding your problem though, as this is only called after everything mission related is loaded.
Are you referring to the player popping in about one second after you join? If so I'm not sure you'll get away from that by just delaying the playgui from loading. I may be wrong though, but you need to tie spawnPlayer(); to the loading function
An easy way to do it and a kind of workaround if the above methods don't work. Would be to add a guiBitmapCtrl to your play gui that covers the whole thing, set it to relative positioning, and put all of the elements you were going to but in the above method inside of this bitmap ctrl, then have a button to set the guiBitmapCtrl invisible.
I'm assuming since you're wanting to do this that it's a singleplayer game, otherwise your player's gonna have the chance of being dead before he even sees the playgui.