GameMaker Help With Instance_deactivate_all()

S

Sahibjot Cheema

Guest
I'm using instance_deactivate_all as a pause mechanic and as you know it makes all objects disappear. Can anyone help me make it so it takes a picture of the screen and leaves that on while pause is active?
 
The YoYo marketplace has a number of pause menu downloads, some free, some paid.

You might want to take a look at them.

Basically want you want to do, is deactivate all instances, save a copy of the application surface, create a pause object so there is one active instance handling the pause menu and in that objects draw event, draw the saved copy of the surface to screen.

And also have the object checking for the player to press the unpause key.

When they unpause, just reactivate all instances and destroy the pause object.

If you search the forums there are example posts on how to do this as well.
 
N

Naillik

Guest
If you want take a picture do that :

pause_sprite = noone

when you press the pause button

if(sprite_exists(pause_sprite))sprite_delete(pause_sprite);
pause_sprite=sprite_create_from_surface(application_surface,0,0,camera_get_view_width(0),camera_get_view_height(0),false,false,0,0)

and draw it

draw_sprite_stretched(pause_sprite,0,0,0,camera_get_view_width(0)+20,camera_get_view_height(0)+12);

the +20 and +12 is because the picture doesn't mach with the size of the view and i don't know why....
 
Top