NextBot/MoveToPos

From Garry's Mod
Jump to: navigation, search
 NextBot:MoveToPos( )

Contents

Description

To be called in the behaviour coroutine only! Will yield until the bot has reached the goal or is stuck

Arguments

Vector pos

The position we want to get to

Arguments

table options

A table containing a bunch of tweakable options.

number lookahead - Minimum look ahead distance.
number tolerance - How close we must be to the goal before it can be considered complete.
boolean draw - Draw the path. Only visible on listen servers and single player.
number maxage - Maximum age of the path before it times out.

number repath - Rebuilds the path after this number of seconds.

Returns

string

Either "failed", "stuck", "timeout" or "ok" - depending on how the NPC got on
Personal tools
Navigation