How do I not click through a sprite?

Get help using Construct 2

Post » Mon Dec 14, 2015 9:10 pm

Hey there!

I've been working on an idle click game that works with a lot of "menus" I have sprites on a main layer that pop open menus in a different layer. Those menus have sprites that have their own actions. Outside the menu I have transparent sprites that trigger the menu to close. My issue is that, when on a menu layer, if you click a sprite with an action, only that action triggers, but if you click on the menu itself (in between the sprite "buttons") or even on the text, and it's overlapping a sprite on the main layer, the sprite on the main layer will trigger it's action.

So, basically, I'm accidentally clicking on a sprite on the layer under the active layer. I tried laying a sprite the same size as the menu underneath the menu that triggers the same layer to become visible, but the click is still registering to the sprite on the lower layer.

Is there any way I can stop this from happening? Since the menu that's being clicked through is a sprite, itself, that is only used for aesthetic purposes, can I give it a property (behavior, action, etc.) that will prevent anything that it's overlapping to be safe from accidentally being clicked?
Posts: 10
Reputation: 522

Post » Mon Dec 14, 2015 9:15 pm

You could use the sprite is on layer condition or even better create groups for the events and deactivate these groups when not needed..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Return to How do I....?

Who is online

Users browsing this forum: burak22, kelany and 3 guests