How do I create 2 route pathfinding

Just started using Construct 2? Post your questions here

Post » Thu Mar 31, 2016 10:56 am

i create route like this
Image
everytime i run, the red always choose b route to go to the blue.
i want the red to choose a route instead. Can you guys tell me how to do that ? :)
B
5
S
1
Posts: 10
Reputation: 341

Post » Sat Apr 02, 2016 5:45 pm

I don't think the Pathfinding behavior has that kind of 'choosing' functionality. One thing you can do is, after deciding which path you want to take but before starting the pathfinding, spawn an invisible solid on the other path so the path can't be chosen. Not ideal, but if no other object is meant to take those paths, it could work.

Another thing you can use is waypoints, and at the branch have the red guy choose between one waypoint or the other.

Here's a tutorial on it:
https://www.scirra.com/tutorials/1113/a ... -waypoints

Here's one that's mostly just a capx:
https://www.scirra.com/tutorials/1367/a ... -waypoints
B
20
S
5
Posts: 23
Reputation: 1,283


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests