how do you script a GUI control to use as a splash screen
by hbomega · in Torque 2D Beginner · 08/12/2013 (1:19 pm) · 48 replies
having problems creating some splash screens, i tried Yahya,s solution and ended up with a problem " SimObject::deleteObject: Object is being deleted whilst performing a script callback " i know what this means but i have no clue how to fix it, so i decided to go with Steve Acaster solution except its outdated and i have no idea how to create the .gui files without the GUI Editor. i know it can be done by script i would like an example of how you would go about creating Gui Controls that can be used for splash Screens from script thanks
i keep getting
pushDialog(): Invalid control: Custom_StartupGui_Background
pushDialog(): Invalid control: Custom_StartupGui_Game
popDialog(): Invalid control: Custom_StartupGui_Game
pushDialog(): Invalid control: Custom_StartupGui_Developer
popDialog(): Invalid control: Custom_StartupGui_Developer
pushDialog(): Invalid control: Custom_StartupGui_Torque
popDialog(): Invalid control: Custom_StartupGui_Torque
popDialog(): Invalid control: Custom_StartupGui_Background
help please someone :(
i keep getting
pushDialog(): Invalid control: Custom_StartupGui_Background
pushDialog(): Invalid control: Custom_StartupGui_Game
popDialog(): Invalid control: Custom_StartupGui_Game
pushDialog(): Invalid control: Custom_StartupGui_Developer
popDialog(): Invalid control: Custom_StartupGui_Developer
pushDialog(): Invalid control: Custom_StartupGui_Torque
popDialog(): Invalid control: Custom_StartupGui_Torque
popDialog(): Invalid control: Custom_StartupGui_Background
help please someone :(
#42
08/14/2013 (11:17 am)
Quote:no it doe not make it to StartupGui_onDone()That's the troubling part then. I think something very simple is wrong, like a file not being executed in the right order or something. If it doesn't bother you, could you zip up your module and send it to me? My e-mail is in my profile. At this point, it would be much faster for me to just quickly step through the script once and find the issue, rather than leading you down a long road.
Custom_StartupGui_Torque and Custom_StartupGui_Background are not being popped
#43
I am gonna see if i can get things how i want them THANKS FOR ALL THE HELP :) :)
08/14/2013 (11:26 am)
Hey we got something it did not work perfectly but it worked it displayed the logos after reading your post i moved where i was calling the loadStartup() function defined in startGuis.cs i was calling the function before i created the scenewindow this must of happened with out me noticing while the (@assets which was to be @asset) was causing the problem I am gonna see if i can get things how i want them THANKS FOR ALL THE HELP :) :)
#44
Still want me to zip it an ship it!
08/14/2013 (11:41 am)
its not working again it showed once an then after that it wouldn't but i'm sure it goes through the whole function now because it loads SceneW1S1 at the end plus it spends the correct amount of time for each screen to be displayed before displaying SceneW1S1 the only problem now is that it's not showing the logosStill want me to zip it an ship it!
#45
08/14/2013 (11:46 am)
Excellent. We are getting closer. Yeah, go ahead and send the module. Keep debugging on your end, though. You might find the problem before I do.
#46
08/14/2013 (12:18 pm)
sent it
#47
08/14/2013 (12:31 pm)
its working again i had to comment out the splash.cs which i use to create the method i got from Amjad (which i got working correctly earlier on) but i wanted to know as much as i could about guis, Thanks for all your help again Michael It really works this time till my next problem :)
#48
08/14/2013 (12:41 pm)
That's great news! Glad I was able to help you out. Debugging can be tedious, but you learn a lot about the engine during the process. Keep up the good work and patience.
hbomega
no it doe not make it to StartupGui_onDone()
Custom_StartupGui_Torque and Custom_StartupGui_Background are not being popped
2: mySceneWindow is defined in scenewindow.cs, and exec in main.cs
3: SceneW1S1 is defined in scenew1s1.cs, and exec in main.cs and also loaded in main.cs
would you like me to paste my main.cs file on pastebin