PathFollower
Path object for a NextBot NPC and bots created by player.CreateNextbot. Returned by Path.
Methods
PathFollower:Chase( NextBot bot, Entity ent )
If you created your path with type "Chase" this functions should be used in place of PathFollower:Update to cause the bot to chase the specified entity.
boolean PathFollower:Compute( NextBot from, Vector to, function generator = nil )
Compute shortest path from bot to 'goal' via A* algorithm.
PathFollower:Draw()
Draws the path. This is meant for debugging - and uses debug overlay.
Vector PathFollower:GetClosestPosition( Vector position )
The closest position along the path to a position
table PathFollower:GetCurrentGoal()
Returns the current goal data. Can return nil if the current goal is invalid, for example immediately after PathFollower:Update.
Entity PathFollower:GetHindrance()
number PathFollower:GetMinLookAheadDistance()
Returns the minimum range movement goal must be along path.
Vector PathFollower:GetPositionOnPath( number distance )
Returns the vector position of distance along path
PathFollower:Invalidate()
Invalidates the current path
PathFollower:MoveCursor( number distance )
Moves the cursor by give distance.
For a function that sets the distance, see PathFollower:MoveCursorTo.
PathFollower:MoveCursorTo( number distance )
Sets the cursor position to given distance.
For relative distance, see PathFollower:MoveCursor.
PathFollower:MoveCursorToClosestPosition( Vector pos, number type = 0, number alongLimit = 0 )
Moves the cursor of the path to the closest position compared to given vector.
PathFollower:MoveCursorToEnd()
Moves the cursor to the end of the path
PathFollower:MoveCursorToStart()
Moves the cursor to the end of the path
PathFollower:ResetAge()
Resets the age which is retrieved by PathFollower:GetAge to 0.
PathFollower:SetMinLookAheadDistance( number mindist )
Sets minimum range movement goal must be along path