Optional
algorithmOptional
considerOnly considered by A* algorithm.
If set to true
, pathfinding will consider costs. Costs are set via tile
properties.
false
Optional
ignoreIf set to true
, pathfinding will only be performed on the char layer of
the start position. If you don't use char layers, activating this setting
can improve pathfinding performance.
false
Optional
isFunction to specify whether a certain position is allowed for pathfinding. If the function returns false, the tile will be consindered as blocked.
It can be used to restrict pathfinding to specific regions.
Beware that this method can become a performance bottleneck easily. So be careful and keep it as efficient as possible. An asymptotic runtime complexity of O(1) is recommended.
Optional
maxIf this is set, the algorithm will stop once it reaches a path length of this value. This is useful to avoid running out of memory on large or infinite maps.
Optional
noOnly relevant if noPathFoundStrategy is set to RETRY.
It sets the maximum amount of retries before giving up.
Optional
noOnly relevant if noPathFoundStrategy is set to RETRY.
It sets the time in milliseconds that the pathfinding algorithm will wait until the next retry.
Optional
noDetermines what happens if no path could be found. For the different strategies see NoPathFoundStrategy.
Optional
pathOnly relevant if pathBlockedStrategy is set to RETRY.
It sets the maximum amount of retries before giving up.
Optional
pathOnly relevant if pathBlockedStrategy is set to RETRY.
It sets the time in milliseconds that the pathfinding algorithm will wait until the next retry.
Optional
pathDetermines what happens if a previously calculated path is suddenly blocked. This can happen if a path existed and while the character was moving along that path, it got suddenly blocked.
For the different strategies see PathBlockedStrategy.
Optional
pathOnly relevant if pathBlockedStrategy is set to WAIT.
It sets the number of milliseconds that the pathfinding algorithm will wait for the path to become unblocked again before stopping the movement.
Optional
targetChar layer of the movement target. If there is no targetLayer
provided,
the current char layer of the moving character is used.
Generated using TypeDoc
Algorithm to use for pathfinding.