Pathfinding logic problem

Just started using Construct 2? Post your questions here

Post » Sun Mar 02, 2014 11:10 am

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!
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 3
Reputation: 208

Post » Fri Mar 14, 2014 5:55 pm

I made a few modifications and was able to get it working.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Sun Aug 24, 2014 1:50 pm

Just saw the reply, a little late perhaps but thanks a lot for looking into it!
B
3
Posts: 3
Reputation: 208


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests