Overlap only one instance

Get help using Construct 2

Post » Thu May 26, 2016 3:12 pm

Hi friends,

There's something probably very easy but I can't get it right. I need to activate a series of switches while my platform character walks by them, but they all are the same object (several instances, logically). What I want is that, when they are overlapped, they change their frame, for example, and when not overlapping EACH OF THOSE, they go back to their original state. But, as overlapping gets every instance, unless my character completely stops overlapping any of the instances, they don't go back to the original frame.

Here's the capx http://www.filedropper.com/switchtest

Any help will be very appreciated.

Thanks in advance and best regards.
B
5
S
1
Posts: 34
Reputation: 512

Post » Thu May 26, 2016 3:19 pm

Add For each switch_sensor, and drag Overlapping and Else as subevents. Then it works.
ImageImageImage
B
71
S
22
G
240
Posts: 3,732
Reputation: 133,990

Post » Thu May 26, 2016 3:23 pm

THANKS. It worked perfectly! I completely misunderstood the "for each" function.
B
5
S
1
Posts: 34
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: Blendi1223, kellehk and 25 guests