GML Help with go to another room

T

Thatonegamedeveloper

Guest
Okay, so I have been following this tutorial on how to make a main menu for game maker studio 2. The problem I am having is the start button transition into another room. I already like the look of the menu and didn't want to change the code. I have already drawn out the button and since I'm kind of new to gml, so I don't know which code to use.

The tutorial I used :
 

PlayerOne

Member
Okay, so I have been following this tutorial on how to make a main menu for game maker studio 2. The problem I am having is the start button transition into another room. I already like the look of the menu and didn't want to change the code. I have already drawn out the button and since I'm kind of new to gml, so I don't know which code to use.
Please post the relevant code using code tags so that we may help you.

In addition, to go to another room you can use room or room_goto function.
 
I assume you have a way of keeping track of which option is selected (i.e. New Game, Load Game, etc.)

For whatever code you are using to determine the option selected, you need to add what each option does if the player presses or clicks.

For example,

Code:
if option == 1{ //new game is selected
     if keyboard_check_pressed(vk_space){
          room_goto(room);
         }
}
 
T

Thatonegamedeveloper

Guest
I assume you have a way of keeping track of which option is selected (i.e. New Game, Load Game, etc.)

For whatever code you are using to determine the option selected, you need to add what each option does if the player presses or clicks.

For example,

Code:
if option == 1{ //new game is selected
     if keyboard_check_pressed(vk_space){
          room_goto(room);
         }
}
Thank you but I tried that in the keyboard press event, step and create an event. It doesn't seem to work.
 
T

Thatonegamedeveloper

Guest
As has already been said, you are going to have to show us all the relevant code you have so we can see what might be wrong. If you don't then we will just be guessing all the time.
I already found out what was wrong, thank though turn out I got the wrong case number. I didn't know if I'm allowed to show the code so I didn't post it. Sorry if this causes any trouble.
 
Top