How to script a custom startup (splash) screen sequence in the simplest way possible.
This isn't to tell you how to make a startup/splash screen/how to use the GUI editor (read the T3D documentation), it's to tell you what to do with them once you have them.
The easiest way to display a series of startup/splash screens when the game first loads is by simply scheduling them one after another.
You know what you want it to look like and you've gone into the GUI Editor and made your custom fullscreen screens and saved them as new GUIs. For this example, you saved them in a new folder: game/art/gui/custom_guis. You only need one to be fullscreen, that's the background, the others can be non-fullscreen elements that will be displayed over that background.
So you have:
1 x Background Screen - that way you don't have to have fullscreen pics for the others - but you can if you want.
If you're using the stock fade-gui-type for your other images/gui elements, then you'll want this to be black or it'll show up bad. If you have no idea what I'm talking about then you have nothing to worry about.
1 x Game Title Screen for "Super Battle Boom Headshot Game"
1 x Developer/Company Screen for "Maladjusted Loner Games"
1 x customized Torque Splash Screen for "Torque/GarageGames"
And you want them to fire off, displaying one by one for a few seconds each, and then show the main menu so the player can actual get to play your game.
First up, you'll need to exec your new Splash Screens. Go to game/scripts/client/init.cs it's where the magic of scripts startup happens.
Down with the stock execing, you'll want to add your new GUI files.
Cool, now it can load you stuff, so time to tell it to do so. Down in that file is the final function for startup: loadStartup();
scripts/gui/startupGui.cs is where to do that. As this is custom, feel free to scrub the lot, just make sure that your first function is loadStartup() unless you want to recall it something in the init.cs file.
To keep things really simple we're going to work with really basic schedules. One function will show the first screen, then a schedule calls the second, then the third, and finally the main menu.
- Display the fullscreen Background image, so that you can display the other screens/elements on it.
- 1 second later, display the Game Title Screen and hold it for 3 seconds
- Display the Developer/Company Screen and hold it for 2 seconds
- Display the Torque Screen for 4 seconds
- Close the startup displays and load up the Main Menu
And that should be that. When you restart, your custom splash screens should play through nice and easy before loading the main menu.