Pausing/Unpausing with ESC

0 favourites
  • 9 posts
From the Asset Store
Engage in an exciting and visually captivating Dice-themed game, featuring dynamic buttons, glowing spotlight effects.
  • Hi, would anyone be able to tell me why this isn't working?

    If for the first statement, instead of "press", I set it to "release", It will bring up my pause screen and will be doing correctly when releasing ESC, but I'm having problems to make the same pause screen disappear pressing ESC again.

    Hum, don't know why you can't see the image.

    Here you go http://imgur.com/0nKQ2

  • You wrote the exact same event for two categories. The computer reads top-down. It sees, "make items visible" before it sees "make them invisible." This means that every time you press esc, Construct 2 can't read the bottom coding. Try adding an, "if items are visible" statement. It would help a lot if you could upload a .capx of the game.

  • Try Construct 3

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

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

    Might try to use pause plugin.

  • Put the test on juegoPausado in subevents of the "On key pressed" event.

    And for your second test, just put a "Else"

    On ESC key pressed

    ... If JuegoPausado = 1

    ...... Do stuff;

    ... Else

    ...... Do other stuff;

  • Miyavi

    Might try to use pause plugin.

    I'm using it for pausing the game actually.

    Put the test on juegoPausado in subevents of the "On key pressed" event.

    And for your second test, just put a "Else"

    On ESC key pressed

    ... If JuegoPausado = 1

    ...... Do stuff;

    ... Else

    ...... Do other stuff;

    That's what I needed, I am actually using r84, so I wasn't aware of these new improvements yet.

  • Hum... got it done like this,

    It pauses the game when I press ESC, and the pause screen comes up, but if I press ESC again, the timer would go on, but the pause screen stays.

  • So.. I still haven't been able to solve this.

    Here's a simplified .capx of what I'm trying to do.

    As you see, the orange screen (my pause screen) pops up when I first press ESC, but it won't pop out when I press ESC again.

  • That's probably because you don't have another layer. And then the display isn't updated.

    You're layer really disappear but as there's nothing to draw nothing is erased... Makes sense? :D

    Anyway the work around is to set a layer (non transparent) beneath your switchable one, and change the events acordingly (layer 1 instead of 0)

  • The .capx I posted isn't my actual game develpoment footage.

    It's just a quick example of what I'm trying to achieve.

    In my actual content, there are several layers (5 if I recall correctly), being #4 the one related to the pause screen.

    In this .capx, it happens just the same as in my actual content: It will pop up, but it won't pop out.

    Some enlightment on the subject will be much appreciated.

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