Make a Global pause button

0 favourites
  • 5 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hi, I?m trying to make a global button of pause for my game.

    But is not working as I thought it would be.

    Do you use Time scale function for this?. I tried using it and it works but it affects the button too, so it takes a while until it starts again From the pause state.

    I used:

    --Set time scale to 0.01

    --and set time scale to 1.

    If I set on pause time scale to 0, the button gets affected too and I can?t get the game enabled again.

    How did you approach this?

  • How does the button actually work? Is it fading out, or animated?

    What does it do before it allows you to click on it?

  • Use system timescale 0 and then right after set pause button only timescale to 1.

  • Great!

    Yeah, I just did that.

    I used

    "SET TIME SCALE TO 0"

    and in the same event

    "SET OBJECT (BUTTON PAUSE) TIME SCALE TO 1"

    To prevent the pause button to get paused also.

    I also used a boolean toggle value to get the menu on and off and it worked really well.

    What I can?t get to work now is the Exit button from that pause menu. In browser it works perfect. But apparently the "browser" object is not fully supported by CocoonJs. I?m using "BROWSER" -- "CLOSE" Action to exit the application. But is not doing anything on the mobile.

    Does anyone know another way around to do this?.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I used

    "SET TIME SCALE TO 0"

    and in the same event

    "SET OBJECT (BUTTON PAUSE) TIME SCALE TO 1"

    To prevent the pause button to get paused also.

    I also used a boolean toggle value to get the menu on and off and it worked really well.

    This is good info to remember. I forgot among all the reading I have done that you can set timescale on a per object basis.

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