Game Development Community

How to setup GUI

by DiUlus-2012 · in Torque 3D Beginner · 10/06/2012 (4:03 am) · 3 replies

Hi,

I am a new user and i am looking for help. I make 3 individual game levels and now i compile them as a game. I like to create a new GUI, so when people start the game... they see following choices:

1) Play
When user click on play option they must see three following option
"Play Level 1",
"Play Level 2",
"Play Level 3".
2) Join
3) Options
4) Exit

Play, Join, Options and Exit are already available by default. I like to know how can i add multiple levels under Play option.


Thanks

About the author

Recent Threads


#1
10/06/2012 (5:35 pm)
When you click on "play" it should already open another window with the list of maps you have, so selecting one takes you into that level. What exactly are you missing?
#2
10/07/2012 (12:01 pm)
There should be a Tutorial or some type of example documentation that shows how to use the GuiEditor to add a button, so I'm not going to cover that.

Once you've created your buttons you'll need to give them a command to execute. Find the field called "Command" for your first button. Inside of it add:
StartLevel("levels/fileNameForFirstMission.mis");
You will do that for each button that you want to load a specific mission -- substituting the relevant filename.

StartLevel() is a script function that already exists as part of the stock ChooseLevelDlg set of scripts. If you're using a project that doesn't have it, or if it's been removed you'll need to reproduce it.
#3
10/08/2012 (5:46 am)
In the Documentation there is a section titled "GUI Editor" that has a six part basic walkthrough on making GUIs in the Tutorials section.