How do I stop/pause a layout completely?

Get help using Construct 2

Post » Tue Feb 23, 2016 11:54 pm

Hello all,

I want to make it in my game so that when the timer hits zero the "Game Over Layer" Appears, displaying the game over text and what not. However, I want everything else in the background to stop moving and pause while the game over screen is displayed; It's odd to have things continue moving and updating after game over is displayed. How would one pause/stop the layout, but keep it in the background?

Thanks,

William
B
8
Posts: 25
Reputation: 356

Post » Wed Feb 24, 2016 3:00 am

You can set time scale to 0, anything should stop moving until you set it back to 1. Still some will not be paused like mouse/touch inputs I believed.
Another way is to put the events that moves/updates those objects into a group and deactivate it when game over.
Hope this helps.
B
7
S
2
G
1
Posts: 42
Reputation: 1,144

Post » Thu Feb 25, 2016 2:26 am

I read a few of the "pause" tutorials on here but wasn't really happy with them. Here's what I did and it seems to work.

I created an animated sprite containing two animations in it of 1 frame each and I called it "pauseButton". Animation one is called Pause and is the standard || Pause icon and animation two is called "Play" and is the standard triangular Play icon.

The rest should be explained in this graphic:

Image

Clicking/touching Pause freezes everything but doesn't disable touch input. I've only tested it with the mouse but I have no reason to believe it won't work on a mobile device.

In your particular case you could replace the touch event with a timer event.

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300


Return to How do I....?

Who is online

Users browsing this forum: Klarner and 26 guests