Move character along path (without obstacles) with pathfinding behavior.

0 favourites
  • 2 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • I want my character to move through the path. But what I want to achieve is different from the examples in the "pathfinding" behaviors guide.

    In the image there are many dots and lines, if I click on a dot the program finds the quickest path and the character begins to move to the closest dot until reaching the selected one.

    In the examples of the guide there are solid objects that prevent passage and force you to find the path. In my case it's the opposite: the character must move within the dashes.

    I had written a complicated algorithm and it worked, but now I want to update it and I don't understand it anymore. maybe with the "pathfinding" behavior I can get the same result or better and faster.

    but is it possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok so this is going to be a bit complicated but i think it would work like this:

    have a variable that changes itself to the number of dot you are on and then have an event kinda like this: Mouse > on object clicked: dot and for what happens you would have like bilion sub-events every sub event would work kinda like this: if dotYouAreOnID = 3 and dotYouClickedID = 1 then moveto dot2, move to dot1.(i am probably not helping you but eh). Hope this works 4 you!

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