Skip to content

Class "Pathfinder"⚓︎

Info

You can get this class by using the following functions:

Example Code
1
local pathfinder = npc:GetPathfinder()
Warning

The following functions are only affected when using the new GetPathfinder method! EntityNPC.Pathfinder retains old behavior for compatibility with existing mods.


Modified Functions⚓︎

Find·Grid·Path ()⚓︎

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

UseDirectPath now works as intended (moves directly towards target when unobstructed by grids).


Move·Randomly ()⚓︎

boolean MoveRandomly ( boolean IgnoreStatusEffects )⚓︎

Now works as intended. Make sure to use Entity:MultiplyFriction with a < 1 value after calling this, otherwise the Entity will constantly accelerate.


Move·Randomly·Axis·Aligned ()⚓︎

void MoveRandomlyAxisAligned ( float Speed, boolean IgnoreStatusEffects )⚓︎

Now works as intended. Make sure to use Entity:MultiplyFriction with a < 1 value after calling this, otherwise the Entity will constantly accelerate.


Move·Randomly·Boss ()⚓︎

void MoveRandomlyBoss ( boolean IgnoreStatusEffects )⚓︎

Now works as intended. Make sure to use Entity:MultiplyFriction with a < 1 value after calling this, otherwise the Entity will constantly accelerate.