How do I avoid enemies from lining up behind each other when pathfinding to player?

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi,

    How do I avoid enemies that have soldid behaviour from lining up behind each other when having multiple enemies pathfinding to player?

    I have tried to let the enemies pathfind to different invisible blocks that at all time surround the player, but this has not solved the problem.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What would you like them to do instead ?

  • Hi lionz,

    I want each enemy to find a position directly beside the player.

    Right now when a couple of enemies have line of sight to player and pathfind to player, only some will reach a position directly beside the player, while the rest will line up behind the ones that achieved to reach the player.

  • I don't think it's possible if you have solid set as an obstacle because they block themselves and can't all find a path right next to the player. I don't like to give the object doing pathfinding the solid behaviour.

  • Hi lionz,

    Then you instead have the problem that the enemies stack.

    In many games multiple enemies being on the screen at the same time can find a way to the player, finding their own spot beside the player.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)