0 Favourites

Game pauses but doesn't unpause

  • I've been having issues with the pause menu I put in my game. It pauses fine, but doesn't unpause.

    The events for it are like this:

    Event: On escape pressed

    Sub-Event: Timescale=0

    Action: Menutext set invisible

    Action: Set timescale to 1

    Sub-Event: Timescale does not equal 0

    Action: Menutext set visible

    Action: Set timescale to 0

    Any help would be appreciated.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hey iScream,

    If I understand the events correctly, I think that the first sub event is unpausing the game, and the second sub event is immediately pausing it again.

    Consider the following walkthrough of the events:

    Timescale = 0.

    > User presses Escape.

    Event: On Escape pressed >>> TRUE

    __ Sub-Event: Timescale = 0 >>> TRUE - because Timescale = 0

    ____ Action: Menutext set invisible >>> Menutext is now invisible.

    ____ Action: Set timescale to 1 >>> Timescale is now 1.

    __ Sub-Event: Timescale does not equal 0 >>> TRUE - because Timescale = 1

    ____ Action: Menutext set visible >>> Menutext is now visable.

    ____ Action: Set timescale to 0 >>> Timescale is now 0 again.

    You'll need to make sure that only one OR the other sub event runs.

    You can use an ELSE condition to achieve this. Manual page for the ELSE condition

    Using the ELSE condition, would look like this:

    Event: On Escape pressed

    __ Sub-Event: Timescale = 0

    ____ Action: Menutext set invisible

    ____ Action: Set timescale to 1

    __ Sub-Event: ELSE (This will only run if the prior event, at the same indentation level, was false.)

    ____ Action: Menutext set visible

    ____ Action: Set timescale to 0

    Hope that helps out.

  • I tried this; it's working now.

    thanks!

  • Awesome! Glad it worked out.

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