Problem with the pause button

  • I have a problem with the pause button. when the pause button is activated you will see several buttons, such as restart button, switch back to the level selection, and button settings.

    when I touch the keys back to the level of choice and I get into the game again, but the pause button can not bring up a pop up (some key) is. what's the solution? thank you

    SOLVED ^^

  • That would be difficult to say without seeing the code and what you are doing. It would help if you uploaded an example of showed screenshots with what you are trying to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That would be difficult to say without seeing the code and what you are doing. It would help if you uploaded an example of showed screenshots with what you are trying to do.

    Solved,

    and I have a new problem.

    when I remove the button with opacity 0 or invisible, the button can still be in touch. I want the button can not be touched after hidden. Thank you. sorry bad english.

    you can see the event sheet

  • Just add another condition to the touch events?

  • Don't worry about your English. It's more than readable to get your message across. It's also far better than what someone could expect me to write in another language.

    Perhaps it would be better to destroy the button and then recreate it when the game is paused? That, or you could add in a flag variable to check to see if it should respond to touch.

    Such as:

    if game is paused {

    set isPaused =1

    }

    For level select button

    if sprite is touched and isPaused equals 1 {

    do your level select stuff

    }

    I think destroying and recreating the sprite would be more work, but it would also be more efficient on computer resources. Though we are only talking about one sprite here so it's not a big impact. Figured I would mention it nonetheless.

  • At first i recommend use several layers. On first layer you can take in-game buttons. On second menu.

    And in touch event add another condition button.visible or visibility of layer with this button.

  • all, i mean like this example. how to fix it? i won't these menu buttons are still can be touched during playing a game.

  • SOLVED.

    THANK YOU ALL!! ^^

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