How to prevent tap event going through sprites?

Get help using Construct 2

Post » Tue Feb 03, 2015 2:16 am

if two sprites are partially overlapping how can I make a tap event that only destroys the top one if that is the one that is tapped?
B
26
S
10
G
5
Posts: 248
Reputation: 6,077

Post » Tue Feb 03, 2015 2:29 am

If they're the same object type, add "Pick top instance" from your sprite's conditions to the "On tap" event.
Moderator
B
106
S
41
G
20
Posts: 1,584
Reputation: 18,917

Post » Tue Feb 03, 2015 2:38 am

linkman2004 wrote:If they're the same object type, add "Pick top instance" from your sprite's conditions to the "On tap" event.


Thank you very much!!!!! :)

But what if they are not the same object type?
B
26
S
10
G
5
Posts: 248
Reputation: 6,077

Post » Tue Feb 03, 2015 3:33 am

Put any objects you want to destroy with taps into a family, then change your event to use that family instead of the sprites.
Moderator
B
106
S
41
G
20
Posts: 1,584
Reputation: 18,917

Post » Tue Feb 03, 2015 10:56 am

linkman2004 wrote:Put any objects you want to destroy with taps into a family, then change your event to use that family instead of the sprites.

Thanks again!

This was a huge help for me :D
B
26
S
10
G
5
Posts: 248
Reputation: 6,077


Return to How do I....?

Who is online

Users browsing this forum: nutmix and 2 guests