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.
If you have a layer appearing above the buttons, you could add a condition to the onclick action
layer "layerabovebutton" is not visible (inverted)
The latter will only be clickable if the layer above it is invisible.
Develop games in your browser. Powerful, performant & highly capable.
great guys, many thanks that was really helpful