Garry's Mod Wiki
Path object for a NextBot NPC and bots created by player.CreateNextbot. Returned by Path.
Methods
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.
Compute shortest path from bot to 'goal' via A* algorithm.
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
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated twice a day. Edits and history are not available.
Last Parsed: Loading...