Run-away monsters only for 1st copy

Get help using Construct 2

Post » Thu Oct 18, 2012 6:09 am

Hello everyone, I have a new issue while making my game, I hope you can help me.

The issue now is that I made a little enemy AI, such as when the player is close to certain weak enemy, the enemy will try to run away from the player when the player is close to it a certain distance. When the player is outside this range if distance, the enemy will only look at the position of the player (if the player is too far to the left of the enemy, the enemy will look only to the left; if the player is too far to the right, the enemy will look to the right).

And it works! HOWEVER, only for the first instance OR the remaining instance of such enemy, if there are 2 enemies of the same only the first one will work well, the second one doesnt seem to be using this AI effectively, it runs from the player when it comes from the left, but when it comes from the right doesnt move! and neither does it look at the player direction.

Any ideas how to solve this? See the pic below to see the event sheet I have for this.

Ruvier2012-10-18 06:10:39
B
9
S
1
Posts: 19
Reputation: 700

Post » Thu Oct 18, 2012 6:29 am

Here, i made example for you.
Hope it's solve your problem, mate.
runawaymonsterfarsmile902012-10-18 06:30:23
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Thu Oct 18, 2012 6:49 am

Lol something so simple as the For Each was missing, I feel bad, thanks for the help once more man!
B
9
S
1
Posts: 19
Reputation: 700

Post » Thu Oct 18, 2012 6:51 am

:D feel free to ask, welcome to C2, bro !
B
50
S
12
G
7
Posts: 259
Reputation: 10,371


Return to How do I....?

Who is online

Users browsing this forum: Lof and 23 guests