Difference between revisions of "LlWanderWithin"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{Pathfinding alpha}} {{LSL_Function| func=llWanderWithin| func_desc=Sets a character to wander about a central spot within a specified radius.| p1_type=vector| p1_name=origin| p…")
 
Line 34: Line 34:
also_functions=
also_functions=
* [[llCreateCharacter]]
* [[llCreateCharacter]]
* [[llDeleteCharacter]]
* [[llEvade]]
* [[llExecPathingCmd]]
* [[llGetClosestNavPoint]]
* [[llFleeFrom]]
* [[llNavigateTo]]
* [[llPatrolPoints]]
* [[llPursue]]
* [[llUpdateCharacter]]
* [[llWanderWithin]]|
also_events=
* [[path_update]]
}}
}}

Revision as of 12:54, 14 February 2012

Summary

Function: llWanderWithin( vector origin, list options );

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

• vector origin Central point to wander about.
• list options No options available at this time.

Caveats

  • Must use llCreateCharacter or script won't compile.
  • Wander area is a rough area based on the specified origin, to a specified radius. So, if 10.0m is specified the object will wander within an area 20m to a side, centered on origin.
  • Wander area can be limited to a smaller area by introducing obstacles such as walls.
  • 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.

Examples

<lsl> default {

   state_entry()
   {
       llCreateCharacter([CHARACTER_DESIRED_SPEED, 50.0]);
   }
   touch_start(integer total_number)
   {
       llWanderWithin(llGetPos(), 10.0, []);
   }

}

</lsl>

Deep Notes

Signature

function void llWanderWithin( vector origin, list options );