-
Notifications
You must be signed in to change notification settings - Fork 8
LPathFollower
Nak edited this page May 13, 2022
·
1 revision
LPathFollower is a custom object to hold PathFind results. The idea is that these can be used on multiple NPC's, unlike PathFollower.
Both NNN and NodeGraph returns this object.
Move Enums ( NN recreates these 4 on the client )
CAP_MOVE_GROUND = 0x01 -- walk/run
CAP_MOVE_JUMP = 0x02 -- jump/leap
CAP_MOVE_FLY = 0x04 -- can fly, move all around
CAP_MOVE_CLIMB = 0x08 -- climb ladders
Note: You can combine these with
bit.bor( CAP_MOVE_GROUND, CAP_MOVEJUMP, CAP_MOVE_CLIMB )
| Functions | Returns | Description |
|---|---|---|
LPathFollower.CreatePathFollower(Vector start_pos ) |
LPathFollower | Creates an empty path-follower with a starting position. |
| Functions | Returns | Description |
|---|---|---|
LPathFollower:GetStart() |
Vector | Returns the starting position of the path |
LPathFollower:GetEnd() |
Vector | Returns the ending position of the path (Note, will update if the target is an entity) |
LPathFollower:GetAge() |
Number | Returns the age of the path. |
LPathFollower:ResetAge() |
Resets the age of the path. | |
LPathFollower:GetLength() |
Number | Returns the length of the path |
LPathFollower:AddSegment( Vector from, Vector to, Number curvature, CAP_MOVE ) |
Adds a segment | |
LPathFollower:FirstSegment() |
Table | Returns the first segment. |
LPathFollower:LastSegment() |
Table | Returns the last segment |
LPathFollower:FindClosestSeg( Vector position ) |
Table | Returns the closest sequence. |
LPathFollower:GetAllSegments() |
Table | Returns all segments. |
LPathFollower:GetClosestPosition( Vector position ) |
Vector | Returns the closest position along the path to said position. |
LPathFollower:GetPositionOnPath( Number distance ) |
Vector | Returns the position on the path by given distance |
LPathFollower:FindDistanceFromPath( Vector position) |
Number | Returns the distance from the path. |
LPathFollower:Invalidate() |
Invalidates the path | |
LPathFollower:IsValid() |
Boolean | Returns true if the path is valid |
| Cursor Functions | Returns | Description |
|---|---|---|
LPathFollower:GetCursorPosition() |
Number | Returns the cursor progress along the path. |
LPathFollower:MoveCursorToStart() |
Moves the cursor to the start of the path. | |
LPathFollower:MoveCursorToEnd( ) |
Moves the cursor to the end of the path. | |
LPathFollower:MoveCursor( Number distance ) |
Moves to cursor to the said distance ahead. | |
LPathFollower:MoveCursorTo( Number distance ) |
Moves the cursor to said distance. |
- BitBuffer
- BSP Parser
- DateTime and Date-Functions
- TimeDelta
-
PathFinding (Coming soon)
- LPathFollower (Coming soon)
- NodeGraph (Coming soon)
- NikNav ( NikNaks Navigation ) on ToDo
- Extended functions (Coming soon)
