How do I block tapping for an object

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • hello

    I have level buttons on one screen , if you rtouch each of them it will send you to the right layout

    howeve i want them to be locked unless a condition happens

    for that i create on layer a large button that is hiding them however if you touch on that area where the buttons are (below of that layer) they can are still active

    Is there a simple way to block tapping on all objects on a specific area ?

  • As I can understand the problem is that you can click object on hidden layer? And you want to avoid this.

    There are 2 ways I use to pass this around:

    1) Use Groups in Event Sheet. So you can activate and deactivate them whenever you want. It means - use special groups for layouts for events you need only when this layout is visible. May not works if you need both layers to show visible and this situation appears.

    2) The second way is to use Is on layer? and Is layer visible? conditions.

    Maybe there are other ways I never used.

  • Like NickRimer says, use groups.

    Add your on click actions to a group, and enable disable this group when needed.

    Another option could be to give them booleans to set them active.

    Or

    If you have a layer appearing above the buttons, you could add a condition to the onclick action

    event

    onclick button

    layer "layerabovebutton" is not visible (inverted)

    action

    etc

    The latter will only be clickable if the layer above it is invisible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • great guys, many thanks that was really helpful

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