Sets a character to wander about a central spot within a specified radius.

Syntax

void llWanderWithin( vector origin, vector dist, list options );

Parameters

vector origin
Central point to wander about
vector dist
Sets how far the character may wander from origin, along each world-aligned axis
list options (instructions)
WANDER_* flags and their parameters

Constants

OptionVParametersDefaultDescription
[ WANDER_PAUSE_AT_WAYPOINTS ]0[ integer boolean ][ FALSE ]Whether the character should pause after reaching each wander waypoint.

Caveats

Examples

default
{
    state_entry()
    {
        llCreateCharacter([CHARACTER_MAX_SPEED, 25, CHARACTER_DESIRED_SPEED, 15.0]);
        //MAX_SPEED is @ 20 by default
    }

    touch_start(integer total_number)
    {
        llWanderWithin(llGetPos(), <10.0, 10.0, 5.0>, [WANDER_PAUSE_AT_WAYPOINTS, TRUE]);
    }
}		

See also

Events

Functions

Deep notes

History

Date of Release 31/07/2012