Support Forum

Controlling Movement Distancec

Hey there! Working on a turn based strategy and have a few questions. I am using AILerp.

I am trying to limit movement to a supplied distance. In other words, if I set a seeker target, it moves to target completion. How do I limit it to, for example, 5 tiles along the path? It seems that movement essentially moves from Start to End along tiles and each tile is a “step” along the path. How do I identify the steps of a path and, for example, return the location of the 5th tile?

Separately, how can this be done for all paths beginning with a specific location? In other words, how can I identify all of the “steps” of all of the paths that are within 5 tiles given that there are blocked nodes?


You might be interested in ConstantPath - A* Pathfinding Project or PathUtilities - A* Pathfinding Project

You could write a custom modifier to intercept the path and trim the vectorPath list to contain at most 5 elements. See Writing Modifiers - A* Pathfinding Project