How to prevent 'click-through'?

Get help using Construct 2

Post » Fri Aug 31, 2012 2:45 pm

Hi,

I'm making a card game and want to show the player's hand as a fan of overlapping cards.

The problem I have is that if I click on a card any card(s) that it's overlapping also pick up the click.

Is there any easy way in Construct2 of getting the higher level Z-Order object to 'soak up' the click? I know that I could get a list of all the affected objects, compare Z-orders and only act on the top one, but that feels a bit clunky. I'm hoping there's any easy built-in way of accomplishing the same thing...
B
6
Posts: 13
Reputation: 443

Post » Fri Aug 31, 2012 3:27 pm

You can use the sprite pick top/bottom condition.

+Mouse: On Left button Clicked on Card
+Card: Pick top instance
-> do stuff
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Fri Aug 31, 2012 4:41 pm

Thank you so much - I didn't even know that condition existed!
I knew there had to be an easy way of doing it :)
B
6
Posts: 13
Reputation: 443


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests