P
Pudding
Guest
so ive been trying to get a working pause menu up and running that captures the view thats currently on the screen and displays it as a surface when the game pauses (when paused the screen is supposed to look like it Everything has frozen in place)
this is my current code (Event: presskey_escape Action: code)
pause = pause + 1
if pause == 1
{
surf = surface_create(room_width, room_height);
surface_set_target(surf);
surface_reset_target();
draw_surface(surf, room_width - view_xview[0], room_height - view_yview[0]);
}
pause = 2
if pause == 2
instance_deactivate_all(true)
if pause == 3
{
surface_free(surf);
instance_activate_all()
pause = 0
}
*note that "pause = 0" from the start and "surf = noone" in a create event.
im sorry if im not using terms commonly practiced on this site but im kinda new to this as a a whole now go and solve the problem for me thank you!
this is my current code (Event: presskey_escape Action: code)
pause = pause + 1
if pause == 1
{
surf = surface_create(room_width, room_height);
surface_set_target(surf);
surface_reset_target();
draw_surface(surf, room_width - view_xview[0], room_height - view_yview[0]);
}
pause = 2
if pause == 2
instance_deactivate_all(true)
if pause == 3
{
surface_free(surf);
instance_activate_all()
pause = 0
}
*note that "pause = 0" from the start and "surf = noone" in a create event.
im sorry if im not using terms commonly practiced on this site but im kinda new to this as a a whole now go and solve the problem for me thank you!