How do I stop/pause a layout completely?

  • 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

  • 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.

  • 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:

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

    This solution was by far the most viable one for me. Activating/deactivating groups are very handy for complex games with multiple events and layouts. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)