AggrorJorn Posted July 15, 2010 Share Posted July 15, 2010 Is there some kind of command available that sets a timer for the application? I want to display an intro splash screen that lasts for 5 seconds. In those 5 second the application should have enough time to load the main menu. Quote Link to comment Share on other sites More sharing options...
Laurens Posted July 15, 2010 Share Posted July 15, 2010 As far as I know, because there is only busy-waiting in C, theres no default implementation in LUA. Perhaps the engine command PauseApp() is of any use. Quote Link to comment Share on other sites More sharing options...
Rick Posted July 15, 2010 Share Posted July 15, 2010 http://lua-users.org/wiki/SleepFunction It's OS specific though it looks like. Not that it matters since LE is Windows at the moment. Quote Link to comment Share on other sites More sharing options...
gordonramp Posted July 15, 2010 Share Posted July 15, 2010 Could be a way to do it explained here.. http://www.promixis.com/forums/showthread.php?t=4188 Quote AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64. Link to comment Share on other sites More sharing options...
cocopino Posted July 16, 2010 Share Posted July 16, 2010 I want to display an intro splash screen that lasts for 5 seconds. In those 5 second the application should have enough time to load the main menu. You shouldn't use sleep then, because it will stop the app from loading (unless you're multithreading) I think you need to use Apptime() and calculate the amount of time passed. Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted July 16, 2010 Share Posted July 16, 2010 couldn't you just load the splash screen (assuming its a 2d image), load the main menu, then at the end of loading all of the menu items, remove the 2d splash screen... you would not need a timer... or just use two timers; one that gets set when you first display the splash screen, and one that is constantly updated in an update loop.... when the difference between the two timers is greater than 5 seconds, remove the splash screen... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 16, 2010 Author Share Posted July 16, 2010 Thanks for your replies. The waiting command with os.clock is indeed not the thing I need, since it pauses the entire app (as well as loading assests.) The thing I am trying to avoid is the dos loading screen. If I can start me game fullscreen with just an image, the dos box is almost emidiatly skipped. Then, while th fullscreen image shows a logo or something, the program can start loading the assets. This approach works okay but 1 thing is still not correct. It takes the program a couple of seconds to display the fullscreen game. That means that the assests already start loading even before the game is fullscreen: creating a longer dos box. What I could do is wait a couple of seconds untill the programm is completely fullscreen with an image and then start the assets loading. Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 16, 2010 Share Posted July 16, 2010 Perhaps Josh will fix it so the dos screen will run silent for lua like it states its possible in the wiki? using the '-s' switch? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 17, 2010 Author Share Posted July 17, 2010 But can you specify that outside of a command prompt? I would have to create an .exe via C# that would run the engine.exe with +s. Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 17, 2010 Share Posted July 17, 2010 well, if you use c# to make an executable to run your program, would you need to even worry about it? I am incorporating lua into a bmx program and when done like that it doesn't show the command window. I had tried at one point using vbscript to run the command window as invisible but it unfortunately also ran the LE graphics window invisible as well Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 20, 2010 Author Share Posted July 20, 2010 I had tried at one point using vbscript to run the command window as invisible but it unfortunately also ran the LE graphics window invisible as well lol. I was thinking of a function like this (pseudo code) function Wait(seconds) local Timer = CreateTimer() while newTimer <= seconds do --do some waiting or just nothing at all end end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.