Skip to content
lsl.devlsl.devLSL Dev

LlPatrolPoints

Looking for the current API? Open the llPatrolPoints reference →

Wiki description

Sets the object patrolling between the points specified in patrolPoints.

Specification

PATROL_PAUSE_AT_WAYPOINTS integer 0 b=[  e= ] s1=id="PATROL_PAUSE_AT_WAYPOINTS" nolink= c=Whether the character should pause briefly after reaching each patrol point.
Option V Parameters Default Description
[ integer boolean ][ FALSE ]Whether the character should pause briefly after reaching each patrol point.

Caveats

  • Must use llCreateCharacter or script won't compile
  • Vertical positions specified for any vectors should be chosen to be as close as possible to the actual height of the terrain requested. Large difference between the provided vertical position and the actual terrain/object will result in failure of the behavior.
  • The patrolPoints list requires a minimum of two valid vectors.
    • If a vector in the list is outside the nav volume (e.g.: too high,) it will be ignored.

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)
    {
        list points = [llGetPos() + <5,0,0>, llGetPos() - <5,0,0>];
        llPatrolPoints(points, [PATROL_PAUSE_AT_WAYPOINTS, TRUE]);
    }
}		

See also: functions

See also: events

History

Date of Release 31/07/2012
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.