Grid based movement avoiding agents

I would like to implement a game where movement is restricted to a grid, and the agents must be restricted to walk on node center. It is a discrete movement game. I managed to snap player movement to grid, but I need an AI that moves without smoothing the path, like AILerp, only I need avoidance between agents, in a discrete way.
For example, the grid does not have obstacles and there is an agent on the tile south of the player, where the spawn point is, so there are more enemies coming from south. How can I make the AI move to east/west to get next to the player?
I already tried making the node where the first agent is unwalkable, but then the agent itself moves.I tryied raycasting and making the tiles unwakable, but how to make them walkable again?
It seems very simple to me, but at the same time I can’t figure it out.
Thanks in advance.

Hey,

Take a look at the ITraversable example. It will allow you to dynamically block certain nodes in your graph. So when an Agent wants to move you could block all nodes occupied by other agents.

1 Like

Thanks for the reply!
Sorry if this is a stupid question, but how can I get the current path my AILerp is following? I know that seeker has a “GetCurrentPath()”, but the only similar thing AILerp has is “hasPath”. Am I missing something?
I want to assign my “Blocker”, which implements ITraversable, to the path of my AILerp, but I can’t do that.
Thanks!