PathFollower
Path object for a NextBot NPC and bots created by player.CreateNextbot. Returned by Path.
Methods
Computes the shortest path to the provided entity arg. PathFollower Object must have Chase type.
For PathFollower objects of the Follow type use PathFollower:Compute
Compute shortest path from bot to 'goal' via A* algorithm. This only works if the PathFollower is the Follow Type.
For PathFollowers of the Chase Type see PathFollower:Chase
PathFollower:Draw()
Draws the path. This is meant for debugging - and uses debugoverlay.
table PathFollower:FirstSegment()
Returns the first segment of the path.
table PathFollower:GetAllSegments()
Returns all of the segments of the given path.
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.
table PathFollower:GetCursorData()
Returns the cursor data
number PathFollower:GetCursorPosition()
Returns the current progress along the path
number PathFollower:GetGoalTolerance()
Returns how close we can get to the goal to call it done.
Entity PathFollower:GetHindrance()
number PathFollower:GetMinLookAheadDistance()
Returns the minimum range movement goal must be along path.
Returns the vector position of distance along path
PathFollower:Invalidate()
Invalidates the current path
table PathFollower:LastSegment()
Returns the last segment of the 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.
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
table PathFollower:NextSegment()
Returns the next segment of the path.
table PathFollower:PriorSegment()
Returns the previous segment of the path.
PathFollower:ResetAge()
Resets the age which is retrieved by PathFollower:GetAge to 0.
PathFollower:SetGoalTolerance( number distance )
How close we can get to the goal to call it done
PathFollower:SetMinLookAheadDistance( number mindist )
Sets minimum range movement goal must be along path