llPatrolPoints
function
Function syntax
llPatrolPoints(list patrolPoints,// A list of at least two position vectors representing the patrol path.list options// A list of PATROL_* flags and parameters to configure the patrol behavior.
);- Energy
- 10
Directs a pathfinding character to patrol sequentially through the coordinates specified in patrolPoints, configured by options.
Sets the object patrolling between the points specified in patrolPoints.
llPatrolPoints([], []);Specification
Section titled “Specification”PATROL_PAUSE_AT_WAYPOINTS // Option parameter for llPatrolPoints (defaults to FALSE).| Constant | Type | Value | Description |
|---|---|---|---|
PATROL_PAUSE_AT_WAYPOINTS | integer | 0 | 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
Section titled “Caveats”- Must use
llCreateCharacteror 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
Section titled “Examples”Example 1
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]); }}History
Section titled “History”Date of Release 31/07/2012
See also
Section titled “See also”Functions
Section titled “Functions”llCreateCharacterllDeleteCharacterllEvadellExecCharacterCmdllGetClosestNavPointllFleeFromllNavigateTollPatrolPointsllPursuellUpdateCharacterllWanderWithin
Events
Section titled “Events”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.