Move action not working with pathfinding

So this means that the MoveAction isn’t getting any valid positions…

Ok, after a fourth pass through your Pathfinding, I noticed this…
What’s likely happening is that you’re short circuting th pathfinding when the path is Walkable, when you really want to short circuit it when the tile is not (!) walkable.
Try this:

Those pesky ! or missing ! can make or break a good algorithm.

YOU FOUND IT! That made it work. I can’t count how many times I went through the Pathfinding script and didn’t see that. Thank you so much for helping me see it.

As I said, those pesky ! can be a royal pain to debug. I know the Pathfinding script by heart, but I still missed it on 3 passes through.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms