Garry's Mod Wiki

Garry's Mod Wiki

  PathFollower:Chase( NextBot bot, Entity ent, function generator = nil )

Description

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.

Arguments

1 NextBot bot
The bot to update along the path. This can also be a nextbot player (player.CreateNextbot)
2 Entity ent
The entity we want to chase
3 function generator = nil
A function that allows you to alter the path generation. See example on PathFollower:Compute for the default function.
Function argument(s):
1 CNavArea area - The area to move to.
2 CNavArea fromArea - The area to move from.
3 CNavLadder ladder - The ladder to move to or from (Validation required), if any.
4 Entity elevator - Will probably be always NULL
5 number length - Precomputed length between area and fromArea.
Function return value(s):
1 number cost - The cost of movement between area and fromArea.
This was recently added in version (2024.05.14). It might only be available on the Dev Branch right now.

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...