Pathfinding On Path Found Object Just moves to the right

0 favourites
  • 4 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • The player will have hunters that go out into specific areas and is not controlling much of the hunters actions. I'm trying to setup the pathfinding and the event I'm working on is that when hunter's health is <= x amount the hunter finds a path back to town to a specific building.

    I'v put the hunter in the town area and the building I am directing it to is above it. Once I trigger the health to the x amount, it finds the path and once found it just moves in a straight line to the right until it hits the town border wall.

    There are no solid objects between the hunter and the shop sprite. I can't figure out why it's doing this. If I change it to find the path based on mouse x and y it moves just fine.

    This is my first time using the pathfinding. Here is an image of the area, events and pathfinding properties.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Moving to the right constantly is a sign that it's struggling to find a path. It's probably because you are finding a path every tick, you should add a trigger once to that condition.

  • Moving to the right constantly is a sign that it's struggling to find a path. It's probably because you are finding a path every tick, you should add a trigger once to that condition.

    Awesome, that worked. I figured it had to be something simple. Thank you so much!

  • Great :)

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