...check if 2 objects aren't touching?

Get help using Construct 2

Post » Tue Oct 01, 2013 11:18 pm

Hello peoples.

I have 2 objects, one in-front and one behind. I want it so that when you click the in-front object, they'd both destroy. I tried doing this by having the behind object destroy on mouse overlap - thinking that when I click on the in-front object, the mouse overlap would destroy the behind one. But, when I had my mouse over it'd just destroy the behind object.

So now, I'm trying to use an instance variable to detect when the behind object isn't being overlapped by the in-front object, then have the mouse destroy it on overlap.

Do you know how to do this? Or just to make the mouse does not destroy the behind object, when the in-front object is still there.

Thanks, Xanco

There is going to be more than just one of each object eventuallyXanco2013-10-01 23:19:19
B
14
S
2
G
4
Posts: 54
Reputation: 3,917

Post » Wed Oct 02, 2013 12:56 am

Try this out. I assumed that you when you click on the front object you want all associated objects destroyed.

I included two examples that do the same thing so take your pick which you want to implement.

https://db.tt/XZq5AMI5
ImageImage
B
129
S
23
G
7
Posts: 1,077
Reputation: 13,253


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests