Pathfinding logic problem

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

    I'm playing with pathfinding and running into a strange problem.

    First I'll describe what's supposed to happen:

    The layout is setup so that every 3 secs an enemy spawns.

    The enemy will move from left to right and when it overlaps a shape it will choose a target. All targets have a number and are free or not free. Every enemy has a number preference and will only move to a free target. When they move to a target the target becomes NOT free. The targets are created by the player by clicking.

    The problem:

    Every once in a while two enemies hit one target even though the target is not free and I can't figure out why. Sometimes it takes a while for this to happen.

    If you see any other things that I'm doing wrong, let me know. I appreciate any feedback

    I've included the example. You have to click a few times to create different targets.

    Thanks for checking it out!

  • I made a few modifications and was able to get it working.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just saw the reply, a little late perhaps but thanks a lot for looking into it!

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