Hey all, first time posting here. Just had a question.
I've got a very simple game that I've been working on updating. It's a paintball style game that has a timer on it. Once the timer runs out, you input your name on the high scores dialog and then the .exe quits. To play again, you must re-launch the .exe.
My question is, how would I be able to add a button that would essentially give the player the option to "Quit" or "Back to Menu" ?
Any help is appreciated, thanks guys.
Creating a "back to main menu" button
Started by jsimpson, Nov 02 2011 12:21 AM
6 replies to this topic
#1
Posted 02 November 2011 - 12:21 AM
#2
Posted 02 November 2011 - 12:36 AM
Make two buttons, Quit and Main Menu respectively.
In one, make it exit the game. In the other, have it go to the main menu room.
Both in the left click event.
Maybe in their own room..
Simple enough?
In one, make it exit the game. In the other, have it go to the main menu room.
Both in the left click event.
Maybe in their own room..
Simple enough?
#3
Posted 02 November 2011 - 12:43 AM
But I'm having trouble implementing it. How do I add it to the game? I can't get these window dialogs figured out.
Thanks for the fast reply, btw.
Thanks for the fast reply, btw.
#4
Posted 18 November 2011 - 09:46 PM
is it something like you have a pause sreen then you press them, cause if its like that i think just going on you obj_player keyboard press 'whater button you want for pause screen' and make in the event create instance of obj_menuscreen button at (cords of you choice) then make on the menus screen button object make mousepress, leftpress change room into (menuroom) srry if not explained wellBut I'm having trouble implementing it. How do I add it to the game? I can't get these window dialogs figured out.
Thanks for the fast reply, btw.
or if theirs no pause screen just go leftclick event on obj_of menu button that important to have a button for the menu it must be an object and then place in the leftclick event warp to room(whaterever your menu rooms called) i hope this helps
#5
Posted 21 November 2011 - 09:37 PM
1-Create a rectangular sprite with the text "Main Menu"
2-Make an object with that sprite
3-Place it wherever you like
4-On that object's mouse left down event, create a script with the following code: game_restart();
5-Your game will restart in the first room
2-Make an object with that sprite
3-Place it wherever you like
4-On that object's mouse left down event, create a script with the following code: game_restart();
5-Your game will restart in the first room
#6
Posted 02 December 2011 - 05:15 PM
Create 2 sprites
1)spr_exit
2)spr_mainmenu
Create the objects
1)obj_exit
2)obj_mainmenu
In obj_exit add a mouse left released event. In this event add an execute code action. In the execute code add:
game_end();
In the obj_mainmenu add a mouse left released event. In this event add an execute code action. In the execute code add:
room_goto(room name);
1)spr_exit
2)spr_mainmenu
Create the objects
1)obj_exit
2)obj_mainmenu
In obj_exit add a mouse left released event. In this event add an execute code action. In the execute code add:
game_end();
In the obj_mainmenu add a mouse left released event. In this event add an execute code action. In the execute code add:
room_goto(room name);
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











