Get Element Earth ▶
Support This Channel ▶
Follow me on Facebook ▶
Follow me on Instagram ▶
Follow me on Twitter ▶
Follow me on Google+ ▶
Here it is. Time to use the knowledge learnt in the Screen Capture tutorial to fool the player into believing the game is still running behind the pause menu when in actual fact it’s all deactivated and invisible.
▼ Useful Links and Resources ▼
GM Studio Project ▶
GM 8 Project ▶
▼ More ▼
General Game Maker Playlist ▶
Game Maker Networking ▶
Happy Coding 😀
Nguồn: https://shaarique.com/
Xem thêm bài viết khác: https://shaarique.com/game/
GravityShift Games
June 28, 2020Be sure to subscribe for more great videos https://www.youtube.com/channel/UCAumdO1yv-di4fI6IZQIy3Q?sub_confirmation=1
A Osorto
June 28, 2020if you have a problem with creating the pause menu screen in which it appears in the bottom right corner, just change the draw_sprite coordinates to the center of the room
if your room's size is 640×850 for an example, you just change the x and y draw coordinates to its half,
320, 425.
LifeAfterBreakfast
June 28, 2020great video thanks!
Andrew Moore
June 28, 2020Great tutorial, however when used in conjunction with your resolution tutorial the pause menu does not rescale. I've tried updating the GUI scale as done in the script however this doesn't seem to work because the pause menu is sprite based rather than object oriented. Have you any suggestion on how to implement the pause menu with your resolution tutorial?
R. Marshellow
June 28, 2020sir ? where can i find .dat file? how to create it?
R. Marshellow
June 28, 2020where can i finf .dat file?
Clayton Games
June 28, 2020There is an issue the menu won't work with drawing sprites you have to draw objects cus sprites are just pictures how do you draw an object?
Azurum Sounds
June 28, 2020You might want to include a sprite_delete(background) on the Destroy event as well, otherwise it will keep eating up memory every time you pause the game. At least that's what it was doing for me. Great tutorial though.
Igor Costa
June 28, 2020This tutorial works on the Studio version of Game Maker?
Shinu Real
June 28, 2020It's me again.
The pause system works just fine on GM8, but once in GM Studio, it has a bug, even in the GMS file you provided: The menu doesn't appear in the center of the room when you switch to full screen.
I've tried to fix this by stating "if" window_get_fullscreen function, but did't work.
CmiPlay
June 28, 2020How do I make it fit my screen if it's 640x 480?
Shinu Real
June 28, 2020Thanks a lot!
pupypup
June 28, 2020what if you have objects you deactivated and you want them to stay deactivated even after pausing and unpausing?
Wolfie The Wolf
June 28, 2020how do i do this for 3d?
+SlasherXGAMES ™
Ethan Cooper
June 28, 2020I am having trouble with this pause menu. So my game is a platformer and I have a view that is very small but the pause menu and the room is very big, how do I fix this?
Trey Fore
June 28, 2020I love this idea but am having trouble making it work. I have used all the logic that is used in this video and everything is working great except when I go to move around in the menu only my last option works with drawing its sub image. anyone know what i could be doing wrong? Thank you in advance!
Nathan Laing
June 28, 2020In GameMaker, is using the "instance_activate"/"instance_deactivate" series of functions the only way to effect a pause?
Isn't there some kind of global "wrapper" you could put around the entire code that's running in GameMaker?
Icezaza1
June 28, 2020ERROR in
action number 1
of Draw Event
for object obj_pause_menu_controller:
Trying to draw non-existing sprite.
Icezaza1
June 28, 2020FATAL ERROR in
action number 1
of Create Event
for object obj_pause_menu_controller:
COMPILATION ERROR in code action
Error in code at line 13:
background = sprite_add("workingscreenie.png", 0, false, true, 640, 360);
^
How2BEpic
June 28, 2020Been spending all day trying to get a basic pause going.
I had an issue with game maker following these exact instructions for some reason, but I fixed t and it works brilliantly.
Subbed.
GoddessKalypso
June 28, 2020I had to change obj_pause_menu_controller > create > "background = sprite_add("screenie.png"), 0, false, true, 640, 360);" to "background = sprite_add_alpha("screenie.png"), 0, false, true, 640, 360);" in order for it to work. Once I pass through the main menu I previously created and into my "TestingRoom", when I his the "Escape" key, I get the error message,
"ERROR in
action number 1
of Draw Event
for obj_pause_menu_controller:
Trying to draw non-existing sprite."
How do you suggest I fix this?
Jamie Engel
June 28, 2020Thanks now i bayme cam success my FPS game but it might not work with 3d games???
Richard Hambrook
June 28, 2020NOBODY USES FUCKING KEYS FOR A MENU EVER
Matix Gaming
June 28, 2020So i wanted to do this but instead of the sprites i wanna create objects like a textbox and a input field but when i create them i dont see them at all… when i remove the background i do see them but i wanna have the background haha , could you help me?
George Junior
June 28, 2020How to convert it to Touch Screen Method?
since it used UP and Down arrow key.
NerdBurglars Gaming
June 28, 2020is it more efficient to add the object to every room rather than creating it once and using escape to toggle a global variable?
CanyonsGaming
June 28, 2020How do I add object_room_controller? @SlasherXGAMES ™
Lukáš Zdražil
June 28, 2020i have problems with dra GUI event
Connor Magson
June 28, 2020How would I get this to work with the mouse? I've been trying to use 'point_in_rectangle' but I can't manage to get it to work.
oscar
June 28, 2020When I go to a room the pause menu pops up automaticly. Does somebody knows how to fix this?
GameThemer
June 28, 2020Thanks for this tutorial 😀
Finally I have n working Pause Menu :DD
sirtrevis42
June 28, 2020If I am using the mouse to select buttons, how would I go about tweaking this so it detects my mouse and knows where the interest is? I would still like to use the interest = "continue" and most of what you have if i can, but just need it to check for mouse instead of enter and so on.
mvtube007
June 28, 2020If I have different resolution rooms?
Ethan N.
June 28, 2020Going into full screen then pausing causes the screenshot to move to the right side of the screen. It doesn't seem to work too well in full screen, any idea how to fix this?
paul
June 28, 2020how comes when i do this the pause screen dont align with my game, it just goes to the side etc
JacobTurnero
June 28, 2020Liked for the intro :O
Andrew
June 28, 2020using screen_save is an extremely elegant solution. this was helpful, thank you.
HotShot888
June 28, 2020This tutorial was very helpful, thanks a lot!
However, there seems to be some lag when pausing. Even in the example you provided, when I press the pause button, the objects get frozen, but there's almost a second of delay before UI appears. Any idea what to do about that?
Gabriel Villalobos
June 28, 2020If I want to do the buttons on clicks…. How do I do that? xD
Felix Halim
June 28, 2020how to resize the box? it is really big in my game … thx
WhiteSprite
June 28, 2020When I try to launch the game, all it gives me is a windows that says "compile errors", and it doesn't show any errors. Just a little blue line. HELP!
n-young
June 28, 2020I had a problem where the esc buton would deactivate everything, put the background on fine, put none of my buttons are placed. No errors pop up either.
Pedro Adorno
June 28, 2020When i press escape, nothing happens… no compile errors what so ever 🙁
I've sent you a message with my project link 🙂
Jayden Muzzin
June 28, 2020Hey, I was wondering whether you might be able to assist me with my pause menu. I have gone through and watched many parts of this video several times and used some of your code to develop mine, but I still cannot get it to work. Every event apart of my pause object, which creates the Pause menu and everything associated with pausing and unpausing the game, works, except the Draw event. When I pause my game, it just generates the default grey background. I have tried numerous options to try and get it to work, but it always yields the same result – this grey background. I'm using views and I want a transparent background across the entire screen, with the pause menu options in the middle of the screen like yours.
My current Draw event looks likes this:
draw_sprite(background, 0, 640, 360);
draw_set_halign(fa_center);
draw_set_font(fnt_menu);
draw_set_color(c_white);
draw_set_alpha(1);
draw_text(view_xview[0]/2, view_yview[0]/4, "Game Paused");
draw_set_color(c_black);
var m;
for (m = 0; m < array_length_1d(pausemenu); m++)
{
draw_text(view_xview[0]/2, view_yview[0]/2 + (m * pmspace), string(pausemenu[m]));
}
The second section of the event with the for loop is supposed to draw the options on the Pause menu which are stored in an array and listed down with space between when drawn.
Thanks so much in advance and awesome video!
0neo8
June 28, 2020i love the channel , this is the first that did not work for me. i think its because you had a lot of stuff done already. i have been trying to get this working on my game for college but even as i typed i knew it wouldn't work because some of the code stayed black and not coloured . I still learned a lot from doing it. Gamemaker code is not so bad after all