How do I resume game after x seconds?

0 favourites
  • 8 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • Hi everyone,

    I have included an event to pause game where on click object, system: set time scale to 0

    I want to be able to resume to game after a few seconds after player clicks on the resume button.

    I set system: wait 5 seconds followed by system: set time scale to 1.0 but the screen just froze there.

    Is there a way to work around this?

  • Add the timer behavior to the resume button (or any object) and when you set the global time scale to 0 you can set the timer object's time scale to 1 so that the timer can still run. Then you can use that timer to resume after 5 seconds.

  • Thanks for explaining. I still don't really get how it works though. I have added the timer behavior but the game resumes right away, not after 5 seconds after I click the resume button. If you don't mind, a simple capx will be of great help.

  • on button clicked - set timer for 5 seconds

    on timer - game resume

  • Is on timer part of system? Can't find it anywhere.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It will be part of the conditions of the object you have given the timer behaviour..

  • LittleStain

    ramones

    I just made it work but it doesn't seem to be what I intended to do.

    I tried the following:

    ON Pause button: Set time scale to 0

    Set Resume button time scale to 1

    On Resume button: Set Timer "resume" for 3 (Once)

    On Timer "resume: System set time scale to 1

    and also this:

    ON Pause button: Set time scale to 0

    On Resume button: Set Resume button time scale to 1

    Set Timer "resume" for 3 (Once)

    On Timer "resume": System set time scale to 1

    It's still stuck when I click on the Resume button.

    The only one that works is this:

    ON Pause button: Set time scale to 0

    Set Resume button time scale to 1

    Set Timer "resume" for 3 (Once)

    On Timer "resume": System set time scale to 1

    However, the game resumes on its own without pressing the Resume button after 3 seconds.

  • Are the resume button and the pause button at the same location?

    Because that would mean that when you touch the pause button, you automatically also touch the resume button and the timer is started..

    I'm guessing that you are setting the timescale to 1 on timer resume, instead of 0 like you type?

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