This is an extension of Tile Movement, except instead of moving one-by-one based on player input, the idea is that there is a single player input (the destination) and that the object needs to move there in a grid-based fashion (one space at a time).
Take for example this image:
<img src="http://i.imgur.com/MmZdqCJ.png" border="0">
Every bright tile is one that the object can move to. Suppose the player clicks the bright tile at the far right (3 spaces to the right of the purple object). The idea is for the purple object to move to the clicked tile, one tile at a time until it gets there.
Does anyone have a good idea on how to accomplish what I'm trying to do?
Currently I have a pathfinding object that will move from the selected object to the destination tile, 'tagging' tiles that it overlaps on the way there. Once it reaches its destination, the object will then move one space at a time through the tagged tiles until it reaches the destination.
However, my pathfinding object never reaches its destination:
<img src="http://i.imgur.com/s4OyVpq.png" border="0">
Anyone know why?