How do I prevent my enemies from overlapping each others?

Get help using Construct 2

Post » Thu Sep 24, 2015 2:56 pm

and keep the movement in 4 directions only like in this capx:


https://dl.dropboxusercontent.com/u/55828593/AI.capx


I've found some way with adding 8 direction movement to them and solid to walls, but it's jerky and make them move in diagonals.
B
10
S
4
G
1
Posts: 31
Reputation: 1,409

Post » Thu Sep 24, 2015 4:38 pm

Hi balsh,

I made an example that seems to work.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

But I had trouble that an enemy stuck on another enemy after some amount of time. The same effect did I had with the solid behavior.
So the enemies now hold a distance from 2 pixels if they collide. Fewer and they will stuck. It is possible that if your game get choppy they will stuck on each other again. Then you have increase the distance.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Thu Sep 24, 2015 5:18 pm

Thank you it's better than what I had but still not perfect sadly. If three of them overlaps one will still be pushed in diagonal it seems, and even will go through walls some times.
B
10
S
4
G
1
Posts: 31
Reputation: 1,409

Post » Fri Sep 25, 2015 6:17 pm

I'm bumping this cause I still can't figure it out.
B
10
S
4
G
1
Posts: 31
Reputation: 1,409


Return to How do I....?

Who is online

Users browsing this forum: jasontoups and 3 guests