setPedWander
Starts GTA's standard on-foot wander task.
Syntax
bool setPedWander(ped thePed [, string movement = "walk", int direction = -1, bool wanderSensibly = true])GTA task mapping
05DE CTaskComplexWanderStandardSCM equivalent: TASK_WANDER_STANDARD
A direction of -1 is resolved by GTA's native random-direction helper before the standard wander task is created.
Arguments
thePedpedLiving streamed ped simulated by this client.
movementstringoptional · default walkwalk or run.
directionintoptional · default -1-1 for GTA's native random direction, or a direction from 0 through 7.
wanderSensiblybooloptional · default trueUse the native sensible-wander behavior.
Returns
true when the task was queued; false for invalid movement, direction, ped state, ownership, or task construction.
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:setWander(movement, direction, wanderSensibly)
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →