setPedGoTo
Replaces the owned ped's primary task with GTA's native go-to-and-stand-still task.
Syntax
bool setPedGoTo(ped thePed, Vector3 target [, string movement = "walk", float radius = 0.5, float slowdownRadius = 2.0, int timeout = -2])GTA task mapping
05D3 CTaskComplexGoToPointAndStandStillCTaskComplexGoToPointAndStandStillTimedSCM equivalent: TASK_GO_STRAIGHT_TO_COORD
Neon selects the untimed task for timeout -2. Every other value uses the timed variant, with -1 normalized to GTA's 20-second SCM default.
Arguments
thePedpedLiving streamed ped simulated by this client.
targetVector3Finite destination.
movementstringoptional · default walkwalk, run, or sprint.
radiusfloatoptional · default 0.5Positive arrival radius.
slowdownRadiusfloatoptional · default 2.0Slowdown radius not smaller than radius.
timeoutintoptional · default -2-2 for untimed, -1 for SCM-compatible 20 seconds, or a non-negative millisecond timeout.
Returns
true when the native task was installed; false when ownership, streaming, liveness, target, movement, radius, or timeout checks fail.
Ownership and lifecycle
Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.
OOP aliases
ped:setGoTo(target, movement, radius, slowdownRadius, timeout)
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →