*SOLVED* Touch only one instance

Get help using Construct 2

Post » Thu Jun 12, 2014 9:12 pm

I want to destroy an sprite on touch. But I have the problem if there are two instances at the same position that both instances are destroyed.
I want that only the instance which is on the top (Z Order) get destroyed. How can I get the two instances that are affected by the touch event?

event.PNG
You do not have the required permissions to view the files attached to this post.
Last edited by RalfW on Fri Jun 13, 2014 4:15 pm, edited 1 time in total.
B
4
Posts: 3
Reputation: 206

Post » Thu Jun 12, 2014 10:27 pm

Have you tried with the Sprite's "Pick Top/Bottom" condition ?
B
4
Posts: 16
Reputation: 236

Post » Fri Jun 13, 2014 9:26 am

You could add an is overlapping condition. If the tile is overlapping another tile when touched, create a new tile in the same position after it is destroyed.
B
9
S
2
Posts: 15
Reputation: 752

Post » Fri Jun 13, 2014 10:06 am

try this demo
You do not have the required permissions to view the files attached to this post.
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535

Post » Fri Jun 13, 2014 4:14 pm

@nosemeocurrenada Your my hero! it worked like a charm :D

Also thanks to the others for your help but nosemeocurrenada solution is for me the easiest and cleanest.
B
4
Posts: 3
Reputation: 206


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests