Check if an object is not in touching

Get help using Construct 2

Post » Wed Sep 04, 2013 9:09 am

How to check if an object is not in touching? This is because I only found is touching object event.
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Wed Sep 04, 2013 9:22 am

If you use the Is Touching Object event, it'll come out with a false if they aren't touching. so just use (and this is just a fast work-around) a global/instance variable (depending on how you need it) called something like "IsTouching". If "Istouching" is false, do whatever you want it to do if they weren't touching.

Sorry if this sounds convoluted.
B
3
Posts: 5
Reputation: 210

Post » Wed Sep 04, 2013 9:26 am

Thanks for the answer.
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Wed Sep 04, 2013 9:33 am

To invert a condition, right click it and choose invert.

If you want to check if one object is being touched while another isn't, this is the way.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 04, 2013 9:35 am

Or you can right click on the "Is touching object" and select invert.
B
17
S
8
G
4
Posts: 93
Reputation: 3,190


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests