That seems a bit complex just for that effect. It can be done much easier but that's one of the perks of programming, the same task can be done thousands of different ways! I love it!
Nice tutorial I didn't know about this technique before. This was the technique I ended up using in the fighting game, it was much better than the one I would have used instead.
I never knew you could make roooms persistant, that's pretty cool btw do you think you could make the music at the end a little softer? It was quite a shock at the end of the video lol
I do not think Real will stream anything more of the development of PixleBit. We have pretty much finished the game. But I think he might want to make more stages if enough people ask for it.
Suggestion for a tutorial! How about you teach us how to make a animating background! (not where the clouds move from side to side but instead how to make different things move/appear and disappear etc)
Ok cool, also for reference I never disagreed with your tut, but what I did say was that I wasn't sure :). The reason I stated this was because when changing back everything was reset, so it kinda gave that impression. Also a request on how to handle a surface with multiple view? Thanks Bro, and sorry if I lead you to believe that I was disagreeing.
If your game have multiple rooms, then u can make the turn on/off all the instances: Create event: pause = 0; Key press event -> others -> escape: if (!pause) { pause =1; instance_deactivate_all(true); //will deactivate all except himself } else { pause =0; instance_activate_all(); } As a simple version of pause function, you can set some draw events Draw event: if (pause) { draw_set_color(c_black); draw_rectangle(0,0,room_width,room_height,0); draw_set_halign(fa_center); draw_set_font(fnt_menu); draw_set_color(c_white); draw_text(room_width/2,room_height/2,"Game Paused"); draw_set_color(c_black); } Set your Obj_pause as persistent and drag into your first room and this should works :)
What? all moving parts in a room stop updating once the room is switched. Even if that wasn't the case then when you switch the room to the pause menu you can make the room speed 0.
The reason this tutorial isn't very useful is because say you have multiple rooms, when you click back on the pause menu it will just return to the room you set it to return to. what you want is for it to return to the room that you are in when you paused it. Can someone PLEASE PLEASE PLEASE help me with this?! P.S sorry if this comment came out to be rude :P
Hey, what you can do is on (key) create obj(whatever you named it) in the create even of the object use script to say (notme=true instance_deactivate_all(notme)) then in the object's destroy event use script (instance_activate_all). This way also helps if you want a menu screen. Now can someone help me find a simple way of pausing all but one objects without deactivating (because deactivating removes things)
I understand that, let me explain. I want a message to appear when something happens bit it doesn't take up the full screen, nor do I want it to. While this message is activate I want everything else to be frozen, then reume when it's gone. Please don't tell me to use the message button, I don't like it and it throws off the flow of my game.
0:25 OMG! i loughed so fucking hard i cant even believe i dont know why but thats one of the most hilarious things i ever heard every time i thing of that i lol so and its pretty hard to explane SO DAMN YOU REALTUTS!!!
Do you know the code for persistance? Im trying to make a quit to menu function but my character is persistant, so when i quit to menu, my character is still on the menu screen
Hey real, i went ahead and made buttons like reset room and exit game on my pause menu but they don't work. They don't highlight when my cursors over them and they aren't clickable for some reason (they are set up to do so). Any idea?
I am not sure about this pause tutorial, what if you had some kind of Enemie's AI or some thing like that, I am guessing that the enemy will continue to move around correct? Even so, nice.... also I think you can use room_goto_previous to get the previous/current room.
ok, i got the exit button to work but not the reset button, my reset button is set to restart the "current room(pause menuroom)" and not the room where my game is being played. enough info? :)
When i am doing different codes, I have found that it occasionally says assignment operator expected, and i says that the error is where the { or } key is, can anyway tell me why this is? And what i have done wrong, because I have been following RealTuts' code.
dude i need to know how to pause with buttons and a highscore and when you loose the game it goes back to pause menu please someone help me with those 3 things pls.
I have a randomly generated game so this does not work out. The the level stays the same unless I restart. Could you make an updated tutorial where it just freezes the game please?
actually thats a little early. where you want to be is 2:39, or you could copy paste: if (keyboard_check_pressed(vk_enter)){ if (paused == true){ paused = false; room_goto(pausemenu); }else if (!paused){ paused = true; room_goto(room); } }
"If your game is just a box moving around, I'm sorry to hear that..." That's exactly what my game is. Download here: squarophobia_video_game.rar | strobeltproduction Password to the RAR file is password (that's not a typo)
The room_goto(#) command works for one room, but what if I have multiple rooms and i want to return to which ever one the player is in currently when the game is paused? I assume at this point having a pause room rather than a controller that just draws a menu would not work as well?
i found an issue with that what if we have multiple rooms? becasue i found out that if i pause say on level 2 and un pause it would go to level 1 how do i fix that?
Midnight Sparkle a lot of the time i have an issue that i cant fix and it turns out the answer was way simple like this. i feel really smart in a dumb way lol
Pfft yeah i know that feeling all the time xD thing is i dont understand Java code (or any code in fact) s i dont know where to put anything and yeah i can use the pre made blocks but sadly its based after cactus so i cant use it for what i wanted to
well of course since we are commenting on a gamemaker video i really recommend this Drag and drop to GML converter that i use freaking a butt ton of the time and helps me understand a lot. heres a link gmc.yoyogames.com/index.php?showtopic=423825
That seems a bit complex just for that effect. It can be done much easier but that's one of the perks of programming, the same task can be done thousands of different ways! I love it!
the dubstep at the end blew up my headphones.
Nice tutorial I didn't know about this technique before. This was the technique I ended up using in the fighting game, it was much better than the one I would have used instead.
tq....so much my game in running well with your tutorial.... thank god i have found the most easy way to code it...thnx once again
THANKYOU! this is the pause menu i wanted!
My game is just a box moving around..
+JuiceBox My game is something like minecraft
Crazy Commenter11
Wow this is an old comment
@@Carpetwurm ikr
I literally jumped out of my chair at the end! That music is WAY too loud! ├¥¼┐√
lol
I never knew you could make roooms persistant, that's pretty cool
btw do you think you could make the music at the end a little softer? It was quite a shock at the end of the video lol
Really thank you for this awesome tut.
I do not think Real will stream anything more of the development of PixleBit.
We have pretty much finished the game. But I think he might want to make more stages if enough people ask for it.
Suggestion for a tutorial!
How about you teach us how to make a animating background!
(not where the clouds move from side to side but instead how to make different things move/appear and disappear etc)
Thanks man, works perfectly. :D
Ok cool, also for reference I never disagreed with your tut, but what I did say was that I wasn't sure :). The reason I stated this was because when changing back everything was reset, so it kinda gave that impression. Also a request on how to handle a surface with multiple view? Thanks Bro, and sorry if I lead you to believe that I was disagreeing.
what if I have multiple rooms, and they're levels? how do I make it go back to the room they were last on?
hey did you figure this out? Im making a multi-level/room game and want to do a pause menu.
If your game have multiple rooms, then u can make the turn on/off all the instances:
Create event:
pause = 0;
Key press event -> others -> escape:
if (!pause)
{
pause =1;
instance_deactivate_all(true); //will deactivate all except himself
}
else
{
pause =0;
instance_activate_all();
}
As a simple version of pause function, you can set some draw events
Draw event:
if (pause)
{
draw_set_color(c_black);
draw_rectangle(0,0,room_width,room_height,0);
draw_set_halign(fa_center);
draw_set_font(fnt_menu);
draw_set_color(c_white);
draw_text(room_width/2,room_height/2,"Game Paused");
draw_set_color(c_black);
}
Set your Obj_pause as persistent and drag into your first room and this should works :)
Diogo Dourado
thank you
I may have to make another tutorial for that, I did not realize that problem when I uploaded the video. Sorry.
Nice tut, thanks. Btw, how to temporary mute all sounds while game paused?
can you make a tut vid of how to make a pause menu that can display your player stats? or skill to wich you could add skill points for your player??
What? all moving parts in a room stop updating once the room is switched. Even if that wasn't the case then when you switch the room to the pause menu you can make the room speed 0.
The reason this tutorial isn't very useful is because say you have multiple rooms, when you click back on the pause menu it will just return to the room you set it to return to. what you want is for it to return to the room that you are in when you paused it. Can someone PLEASE PLEASE PLEASE help me with this?! P.S sorry if this comment came out to be rude :P
Hey, what you can do is on (key) create obj(whatever you named it) in the create even of the object use script to say (notme=true instance_deactivate_all(notme)) then in the object's destroy event use script (instance_activate_all). This way also helps if you want a menu screen.
Now can someone help me find a simple way of pausing all but one objects without deactivating (because deactivating removes things)
I understand that, let me explain. I want a message to appear when something happens bit it doesn't take up the full screen, nor do I want it to. While this message is activate I want everything else to be frozen, then reume when it's gone. Please don't tell me to use the message button, I don't like it and it throws off the flow of my game.
Hey real, do you know when you're next livestream on Pixelbit will be?
Maybe make a variable called 'RoomCur' to check the current room?
0:25 OMG! i loughed so fucking hard i cant even believe i dont know why but thats one of the most hilarious things i ever heard every time i thing of that i lol so and its pretty hard to explane SO DAMN YOU REALTUTS!!!
Please make a button tutorial
Haha yes, I noticed when the video went up that it is quite loud, sorry about that.
Do you know the code for persistance? Im trying to make a quit to menu function but my character is persistant, so when i quit to menu, my character is still on the menu screen
Can you Do a tutorial on making a top down sword fighting game?
Please make more tutorials for enemys.
Hey real, i went ahead and made buttons like reset room and exit game on my pause menu but they don't work. They don't highlight when my cursors over them and they aren't clickable for some reason (they are set up to do so). Any idea?
I am not sure about this pause tutorial, what if you had some kind of Enemie's AI or some thing like that, I am guessing that the enemy will continue to move around correct? Even so, nice.... also I think you can use room_goto_previous to get the previous/current room.
ok, i got the exit button to work but not the reset button, my reset button is set to restart the "current room(pause menuroom)" and not the room where my game is being played. enough info? :)
How do you do buttons?
Save the current room as a variable before you change it to the pause room and then go back by using room_goto(variablename)
Thank-you.
When i am doing different codes, I have found that it occasionally says assignment operator expected, and i says that the error is where the { or } key is, can anyway tell me why this is? And what i have done wrong, because I have been following RealTuts' code.
how do you make it if you have more rooms then the pause menu have to see what is the room where you came from. How can i make that
What about a way to pause the game within the same room?
Thnx dude! That per
dude i need to know how to pause with buttons and a highscore and when you loose the game it goes back to pause menu please someone help me with those 3 things pls.
I have a randomly generated game so this does not work out. The the level stays the same unless I restart. Could you make an updated tutorial where it just freezes the game please?
What if your game has multiple rooms?
But what if you have enemies following you? How do you freeze them?
that shouldn't be a problem since the pause screen's a different room altogether.
I have a problem with whenever I have moving text in a textbox. The position or origin of the text resets itself for some reason. How do I fix that?
You'd still have to change the code to make it go to the previous room.
I love you 'subs'
I want you to change the room and pause it to change the pause image
How do i do?
LOL! my problem with a pause menu was that i forgot that you could make the room presistent
2:13 easier way to do that:
paused = !paused
actually thats a little early. where you want to be is 2:39, or you could copy paste:
if (keyboard_check_pressed(vk_enter)){
if (paused == true){
paused = false;
room_goto(pausemenu);
}else if (!paused){
paused = true;
room_goto(room);
}
}
I suggest using particles.
That isn't a pause.
i didn't want a pause menu i want a pause button in the game, when you click it everything freezes..
What if there are moving features to the room, they will keep moving. You need to make a video that actually makes a pause menu not a roomswitch
Key Press "Space" Event -> Code Block -> show_message("paused") -> Simple as that!
lol jk ^)^
"If your game is just a box moving around, I'm sorry to hear that..."
That's exactly what my game is. Download here: squarophobia_video_game.rar | strobeltproduction Password to the RAR file is password (that's not a typo)
The room_goto(#) command works for one room, but what if I have multiple rooms and i want to return to which ever one the player is in currently when the game is paused? I assume at this point having a pause room rather than a controller that just draws a menu would not work as well?
sirtrevis42 you can try to make a variable of which room the player is
Would this be the solution to making a drag and drop menu for my game where he can select his weapon element?
Ok I made this pause screen as my Drag and Drop menu but I don't know how to go to the room I was in BEFORE I go to this room . Know what I mean?
Well, give me more info
What to do if I have more than 1 room?
I would think you can recreate the object and copy the code but change the room that it sends you back to and put that in your other room.
i found an issue with that what if we have multiple rooms? becasue i found out that if i pause say on level 2 and un pause it would go to level 1 how do i fix that?
make more pause menus
oh gosh O-o"
Midnight Sparkle a lot of the time i have an issue that i cant fix and it turns out the answer was way simple like this. i feel really smart in a dumb way lol
Pfft yeah i know that feeling all the time xD thing is i dont understand Java code (or any code in fact) s i dont know where to put anything and yeah i can use the pre made blocks but sadly its based after cactus so i cant use it for what i wanted to
well of course since we are commenting on a gamemaker video i really recommend this Drag and drop to GML converter that i use freaking a butt ton of the time and helps me understand a lot. heres a link gmc.yoyogames.com/index.php?showtopic=423825
Haha yes that is a method of doing it :P
there you go.. 20 likes :)
YAY! THIS wasen't helpful cause im getting error and errorS!!!!!!!!!!!!!!! help
Make the controller persistent.
@maffiaKevin
Well you can't.
thats it.
Nothing more
Nothing less.
sweet boy
i write like this paused = !paused
am russian я Россиянен
nvm
26(;
How do you do buttons?