Action for when sprites DIDN'T collide?

Get help using Construct 2

Post » Sun Feb 10, 2013 2:49 am

Hi everyone! (I look forward to the day I can answer instead of ask, but...)

This is working for me so far (simplified):

Player on collision with Enemy :
AND Enemy is playing Attack1 animation : (action) Player is hit


I can't figure out how:
if the enemy attacks, but DOES NOT collide with Player, then he plays his "vulnerable" animation. (In other words, the Player has successfully dodged.)

Any ideas?
B
6
Posts: 13
Reputation: 782

Post » Sun Feb 10, 2013 3:11 am

Use the "Is overlapping" condition and invert the condition by right clicking or pressing "I" on the keyboard. So essentially this means "Is not overlapping".
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Feb 10, 2013 3:12 am

Use 'Is overlapping'. You can invert it (right click and invert) to detect when something isn't colliding.

Edit -> beat me to it ;)thehen2013-02-10 03:12:25
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Sun Feb 10, 2013 3:39 am

Perfect, thanks both of you!

In case someone has the same question, I used:

Is animation Attack1 playing
AND Player is (not) overlapping Enemy :   Set enemy animation to "Missed"
AND Animation frame > 3

I had to add the 3rd condition or else the Attack1 animation would begin and immediately see it's not overlapping, and switch to "Missed" animation.
The 3rd condition ensures it has time to begin and get into attacking range!

Thanks again, guys! (Is there a way to flag/reward someone who had a helpful reply? I need to look into etiquette!)
B
6
Posts: 13
Reputation: 782


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests