Two Pathfinding questions

0 favourites
  • 2 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • 1: I want the sprite I've attached the behavior to to only move in the four cardinal directions, no diagonals. I understand that disabling the "Diagonals" option means that the path will only allow those directions, but I want the sprite object to only move in those directions as well, veering along the path just outside it as it changes directions. As I have it moving over a tilemap, this sort of veering naturally means it's never lining up correctly. How do I make it so that the sprite object can only move up down left and right as it makes it's way along the path?

    2: The sprite object finishes moving just next to the points I want it to end on. I assume this is something like when the edge of the sprite touches the edge of the sprite marking it's destination, it stops there. How to I make it so that it doesn't stop moving until the sprite is centered over it's destination point?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to implement your own movement events instead of using "move along path". After you find the path, you can use Sprite.Pathfinding.NodeCount to get the number of nodes and Sprite.Pathfinding.NodeXAt(Index), Sprite.Pathfinding.NodeYAt(Index) to get the x,y position of each node.

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