pixeltroid
Member
So I just discovered that my pause menu appears in the title screen if I press escape. This obviously shouldnt happen but I dont know what to do.
My title screen rooms names are "room_start" and "room_story". I dont want the player to summon the pause menu in those rooms.
How do I make it so that the pause screen cannot be created in those rooms??
Here's the code for the pause object:
Create:
Draw:
Press "escape"
Is there a way to modify this code so as to prevent the pause menu from appearing in "room_start" and "room_story" ??
Any help would be appreciated!
My title screen rooms names are "room_start" and "room_story". I dont want the player to summon the pause menu in those rooms.
How do I make it so that the pause screen cannot be created in those rooms??
Here's the code for the pause object:
Create:
Code:
pause = 0
Code:
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_small)
draw_set_color(c_white)
draw_text(view_xview + view_wview/2, view_yview + view_hview/2, "GAME PAUSED");
draw_set_color(c_black)
}
Code:
if (! pause)
{
pause = 1
instance_deactivate_all(true);
instance_create(view_xview+128,view_yview+144,obj_pausemenu)
}
else
{
pause = 0;
instance_activate_all();
with (obj_pausemenu) {instance_destroy();}
}
Any help would be appreciated!