Search

Compare Yourself

When did you start making games with GameMaker?

Loading ... Loading ...
Special Effects:

Make your games pause (detailed)

In this GameMaker video tutorial you learn how to add a pause feature to your game and make it pause by command.

(credit GreenYoshi94)

The code from the tutorial:

{
draw_set_font(font_Pause);
draw_set_color(c_blue);
draw_set_halign(fa_center);
draw_text(room_width/2,100, 'Game Paused. Press any key to continue');
screen_refresh();
keyboard_wait();
io_clear();
}

2 comments to Make your games pause (detailed)

  • Rakumi

    i found a problem with the script for those who use gm7 or gm7 with morts pro menus. you need to take out the () from the top and bottom of the script.. or it will fail each and every time and force abort.
    so it should look like this (note font0 is my default font)

    draw_set_font(font0);
    draw_set_color(c_black);
    draw_set_halign(fa_center);
    draw_text(room_with/2,400, ‘game paused. press any key to continue’);
    screen_refreshed();
    keyboard_wait();
    io_clear();

    \\this part\/ its tricky too for its the leangth of the room ind,sise witch pretty much means two numbers timed on gm7 is = leangth of the room.if its done wrong it will force abort too!! as you can tell my room is 800 wide. very important too is the fact if you have a huge room and you use views you should go on views length instead!!!\\
    \/\/\/\/\/\/
    draw_text(room_with/2,400, ‘game paused. press any key to continue’);

    this is not to insult anyone its just a stupid thing that had to be changed when going from game maker 6 to game maker 7 don’t know why they did that but its pretty stupid. and if his text dosen’t work for your game use mine it most likely work if you use some of my explanations.

    sorry dude.

  • Dr.GameMaker

    Hi Rakumi,

    Thanks for pointing that out and providing the solution!
    If you have the GMK file of this tutorial, please send me and I will post it for others to learn from…

    TNX,
    Dr.GameMaker

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>