Trigger button but not button on layer below...

  • I have a one-click game that has a single button (MainButton) that covers the whole layout.

    On the Game Over screen are three other buttons (ButtonShare, ButtonRate, ButtonLeaderboard) on a layer above MainButton - however when I press any of these three buttons it also triggers MainButton which restarts the game.

    How would I go about implementing pressing ButtonShare, ButtonRate, or ButtonLeaderboard without also triggering ButtonMain at the same time?

    Thanks all :)

  • Many ways to do this:

    - Move the main button outside when game over. Bring back when restart game.

    - Use variable to limit the action of main button.

    Ex: if gameState = 0, can press button main only. When game over, set gameState to -1

    - On touched button Main, add sub condition that it is not.touching any button in game over screen.

    - And more and more :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The sub-conditions worked. Added sub-conditions then inverted them.

    Thanks for your help 👍

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