Buttons over Buttons

0 favourites
  • 6 posts
From the Asset Store
A set of retro 16-Bit Neon UI elements to make your menus pop!
  • On my level complete dialog there is a button to go to the next level.

    Because this button is sometimes over a click event in the next level, it can accidently trigger the event.

    I have tried "on end of layout" and pausing but with no luck.

    What is the best practice to prevent this happening.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There many ways to fix this,depends on your game style.

    Can you upload your capx?

  • the most basic way is to set a 'flag'.

    OnClick & LevelCompleteDialogFlag = 0 (for your gameplay click event)

    OnClick & LevelCompleteDialogFlag = 1 (for your End Dialogue click)

    then just set the flag to 1 when the level is over and it will allow that click to happen and NOT the gameplay click event. Just remember to re-init it to 0 so your gameplay works correctly when you go back into to playing..

  • Thanks will try the flag option

  • I've created a family "buttons" with boolean variable "isClickable".

    Now everything which is clickable should be added to the family and then in event sheet you can create conditions like

    On object tapped & object isClickable - do something

    Setting isClickable to true/false is like enabling/disabeling the clickable object.

  • I've created a family "buttons" with boolean variable "isClickable".

    Now everything which is clickable should be added to the family and then in event sheet you can create conditions like

    On object tapped & object isClickable - do something

    Setting isClickable to true/false is like enabling/disabeling the clickable object.

    That's a neat way of doing it.

    Thanks

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