Skip to content

Class "PathFinder"⚓︎

Info

You can get this class by using the following function:

Functions⚓︎

Evade·Target ()⚓︎

void EvadeTarget ( Vector TargetPos )⚓︎

Moves this Entity away from TargetPos if it is too close, like a Mulligoon.


Find·Grid·Path ()⚓︎

void FindGridPath ( Vector Pos, float Speed, int PathMarker, boolean UseDirectPath )⚓︎

Moves this Entity towards Pos at a speed of Speed. PathMarker sets the GridPath value for the tile the Entity is walking over.

PathMarker notes

GridPath values pseudo-enumeration:

900 : Set by some enemies when they pass through a tile. De-prioritises the tile for pathfinders. Degrades over time in steps of 100.

950 : Set by fire places. De-prioritises the tile for pathfinders. Does not degrade.

1000 : Set by grid entities. Invalidates the tile for pathfinders. Impedes grounded player movement. Does not degrade.

3000 : Set by pits. Invalidates the tile for pathfinders. Impedes grounded player movement. Does not degrade.

3999 : Set by grimaces. Invalidates the tile for pathfinders. Impedes grounded player movement. Drops to 900 and then degrades over time in steps of 100 (Grimaces reset value every frame).

Bug

UseDirectPath does not seem to work, as the Entity will always move along the cardinal axes.


Get·Evade·Movement·Countdown ()⚓︎

int GetEvadeMovementCountdown ( )⚓︎


Get·Grid·Index ()⚓︎

int GetGridIndex ( )⚓︎

Returns the index of the tile the Entity is currently over.


Has·Direct·Path ()⚓︎

boolean HasDirectPath ( )⚓︎

Returns true if the Entity has a direct path to its target, and only if the Pathfinder is set to use a direct path to its target. The target can be set with functions such as FindGridPath().


Has·Path·To·Pos ()⚓︎

boolean HasPathToPos ( Vector Pos, boolean IgnorePoop )⚓︎

Used for safe check if any NPC is behind rocks/pits, doesn't disturb class members.


Move·Randomly ()⚓︎

boolean MoveRandomly ( boolean IgnoreStatusEffects )⚓︎

Moves around randomly in all directions, like a Gusher.


Move·Randomly·Axis·Aligned ()⚓︎

void MoveRandomlyAxisAligned ( float Speed, boolean IgnoreStatusEffects )⚓︎

Bug

Doesn't seem to do anything.


Move·Randomly·Boss ()⚓︎

void MoveRandomlyBoss ( boolean IgnoreStatusEffects )⚓︎

Moves around randomly in all directions while generally moving towards the player.


Reset ()⚓︎

void Reset ( )⚓︎


Reset·Movement·Target ()⚓︎

void ResetMovementTarget ( )⚓︎


Set·Can·Crush·Rocks ()⚓︎

void SetCanCrushRocks ( boolean value )⚓︎

Notes

Does not allow the Entity to crush rocks, and does not make FindGridPath() behave as though the Entity can.


Update·Grid·Index ()⚓︎

void UpdateGridIndex ( )⚓︎



Last update: March 20, 2025