GML:
if(keyboard_check_pressed(vk_escape)){
global.pause = !global.pause;
if(global.pause){
instance_deactivate_all(true);
layer_hspeed("Background",0);
screenshot = sprite_create_from_surface(application_surface,0,0,view_wport,view_hport,0,0,0,0);
}else{
if(screenshot!=-1){
sprite_delete(screenshot);
screenshot = -1;
}
instance_activate_all();
layer_hspeed("Background",-1.5);
}
}
if(global.pause==false){
global.time++;
}else{
draw_sprite_ext(screenshot,0,0,0,1,1,0,0,1);
}
draw_text(20,20,global.pause);
this is how the game is unpaused
and paused it looks like this.
Any and all help is appreaciated