April 24, 2024, 03:14:32 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
For WME related articles and tutorials visit
WME Resource Center
.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Help me with my menu
« previous
next »
Pages: [
1
]
Print
Author
Topic: Help me with my menu (Read 4162 times)
0 Members and 1 Guest are viewing this topic.
wanted123
Lurker
Karma: 0
Offline
Posts: 6
Help me with my menu
«
on:
March 03, 2011, 11:39:12 AM »
Hello All! I'm new to this forum so i want to make a game i'm maybe 10% done with my game. i want to know how to make my menu to show up when i'm starting the game. My meni will have new game, load game extras, quit. In which script i need to write and what i need to write to make my meni show up after i started the game. My english is not very good!
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Help me with my menu
«
Reply #1 on:
March 03, 2011, 12:06:59 PM »
Create a new scene in ProjectMan, name it "menu" or something. This scene will load a window representing the menu. To do that, edit this scene's scene_init.script and insert something like this:
Code: WME Script
var
mainMenu =
Game
.
LoadWindow
(
"path\mainmenu.window"
)
;
mainMenu.
GoExclusive
(
)
;
Now you need to create the menu window itself. Again, you can add a new window in ProjectMan and edit it using WindowEdit.
And finally tell your game to load the menu scene first. In ProjectMan there's a "Startup scene" option for that.
Be sure to check the "WME Demo 3D". It does exactly what you want, so you can find inspiration and more details there.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
wanted123
Lurker
Karma: 0
Offline
Posts: 6
Re: Help me with my menu
«
Reply #2 on:
March 03, 2011, 02:23:17 PM »
thanks all working perfectly but now when i click esc in the mainmenu is showing the other ingame menu. i want to have two menus one for new game, quit, extras, loadgame(that's ok). but the other ingame menu with savegame and quit is showing if you press esc in the main menu.
Sorry for my BAD ENGLISH
Logged
anarchist
Regular poster
Karma: 5
Offline
Gender:
Posts: 212
Re: Help me with my menu
«
Reply #3 on:
March 03, 2011, 06:12:25 PM »
For this type of menu, instead of:
Code: WME Script
mainMenu.
GoExclusive
(
)
;
try
Code: WME Script
mainMenu.
GoSystemExclusive
(
)
;
Logged
wanted123
Lurker
Karma: 0
Offline
Posts: 6
Re: Help me with my menu
«
Reply #4 on:
March 03, 2011, 09:25:16 PM »
New problem now in the main menu when i click esc menu closes this is the mainmenu need to stay like in other games so when i click esc my game need to ask if i want to quit. so how i can change in the main menu when i click esc to ask if i want to quit. not just to close the mainmenu i hope you'll understand me
Logged
anarchist
Regular poster
Karma: 5
Offline
Gender:
Posts: 212
Re: Help me with my menu
«
Reply #5 on:
March 03, 2011, 09:34:09 PM »
Look inside your main menu script for the
on "Keypress"
event. You should see something like this:
Code: WME Script
on
"Keypress"
{
// on Esc key
if
(
Keyboard
.
KeyCode
==VK_ESCAPE
)
{
There you can define what happens when the player presses the escape key
(VK_ESCAPE)
Logged
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Help me with my menu