llUpdateCharacter
void llUpdateCharacter(list Options)Updates settings for a pathfinding character.
Parameters
-
Options(list) - Character configuration options. Takes the same constants as llCreateCharacter().
default{ state_entry() { llCreateCharacter([CHARACTER_DESIRED_SPEED, 10.0]);
list points = [llGetPos() + <5,0,0>, llGetPos() - <5,0,0>]; llPatrolPoints(points, []); }
touch_start(integer total_number) { llUpdateCharacter([CHARACTER_DESIRED_SPEED, 50.0]); }}Parameters
Section titled “Parameters”CHARACTER_DESIRED_SPEED
Section titled “CHARACTER_DESIRED_SPEED”- Ranges from 0.2 to 40.0
CHARACTER_RADIUS
Section titled “CHARACTER_RADIUS”- Ranges from 0.1 to 5.0
CHARACTER_LENGTH
Section titled “CHARACTER_LENGTH”- Ranges from 0.0 to 10.0
TRAVERSAL_TYPE
Section titled “TRAVERSAL_TYPE”- Use one of:
TRAVERSAL_TYPE_SLOW,TRAVERSAL_TYPE_FAST,TRAVERSAL_TYPE_NONE - Defaults to
TRAVERSAL_TYPE_NONEif omitted - Controls how a character moves on terrain with less than 100% walkability (e.g., SLOW for a cat crossing a street, FAST for a car in a swamp)
CHARACTER_TYPE
Section titled “CHARACTER_TYPE”- Use one of:
CHARACTER_TYPE_A,CHARACTER_TYPE_B,CHARACTER_TYPE_C,CHARACTER_TYPE_D,CHARACTER_TYPE_NONE - Defaults to
CHARACTER_TYPE_NONEif omitted - Determines which of the 4 walkability coefficients the character uses
Caveats
Section titled “Caveats”- This function is subject to change
- Character shape is a capsule (cylinder with spherical ends) defined by
CHARACTER_LENGTH(tip to tip) andCHARACTER_RADIUS(circular cross-section) - The character’s true length cannot be smaller than twice the radius; however, you can specify a value lower than that (but greater than zero) and the script won’t complain
- The capsule is usually oriented vertically; you can make it horizontal by using an object long in its local X-axis, but horizontal capsules may become stuck more easily
- Use a vertical capsule whenever possible
- Removing the script from a prim will not stop pathing behavior (similar to particles and hover text). To stop a pathing command, use
llExecCharacterCmd(CHARACTER_CMD_STOP, [])
See Also
Section titled “See Also”- llCreateCharacter
- llDeleteCharacter
- llEvade
- llExecCharacterCmd
- llGetClosestNavPoint
- llFleeFrom
- llNavigateTo
- llPatrolPoints
- llPursue
- llWanderWithin
Related Events
Section titled “Related Events”- path_update