llPatrolPoints
void llPatrolPoints(list Points, list Options)Patrol a list of points.
Sets the points for a character (llCreateCharacter) to patrol along.
Parameters
-
Points(list) - A list of vectors for the character to travel through sequentially. The list must contain at least two entries.
-
Options(list) - No options available at this time.
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]); }}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
patrolPointslist 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.