How to get the Closest Node Between Seeker and Target surrounded by Invalid Tags

Hi everyone.
I’ve a gridmap and I’m using valid tags different for each seeker.
For the sake of simplicity let’s just say I’ve a Seeker that can’t walk on “Rocky” tags.

If the target is surrounded by an obstacle (and so surrounded by node.Walkable = false) and I ask the seeker to find the path, the seeker will just find the Closest node on the path.

This is the desired behaviour, but it doesn’t work if I replace the non walkable nodes with tags.

In fact, if the target is surrounded by “Rocky Tagged Nodes” the seeker won’t move at all. It will send me back: two warnings:
“The path of the unit [unitname] has sent an error. Error: True”
“No open points, whole area searched”.

And a message:
“Path Failed : Computation Time 2.00 ms Searched Nodes 60
Error: No open points, whole area searched”

How can I find the closest node of a target surrounded by Invalid Tags (using the A* pro version)?


You can set the “calculatePartial” flag to true before starting the path. That will make it return the best path so far if that error should occur.

In the movement script you will have something like

var p = ABPath.Construct(...);

Insert a line like this

var p = ABPath.Construct(...);
p.calculatePartial = true;

Note that this feature is currently a bit of a work in progress, but I think it should work for you in its current state.