Difference between revisions of "LlEvade"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
{{Pathfinding alpha}}
{{Pathfinding alpha}}
{{LSL_Function|
{{LSL_Function|
inject-2={{LSL Function/uuid|target|object=*}}|
func=llEvade|
func=llEvade|
func_desc=Characters will (roughly) try to hide from their pursuers if there is a good hiding spot along their fleeing path. Hiding means no direct line of sight from the head of the character (center of the top of its physics bounding box) to the head of its pursuer and no direct path between the two on the navmesh.|
func_desc=Characters will (roughly) try to hide from their pursuers if there is a good hiding spot along their fleeing path. Hiding means no direct line of sight from the head of the character (center of the top of its physics bounding box) to the head of its pursuer and no direct path between the two on the navmesh.|
p1_type=key|
p1_type=key|
p1_name=target|
p1_name=target|
p1_desc=Agent or object to evade|
p1_desc= to evade|
p2_type=list|
p2_type=list|
p2_name=options|
p2_name=options|
p2_desc=No options currently available|
p2_desc=No options currently available|
caveats=*Must use llCreateCharacter or script won't compile
caveats=*Must use [[llCreateCharacter]] or script will not 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.
*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.
*If the target is an object, it must be unlinked or be the root prim of a linkset.|
*If the {{LSLP|target}} is an object, it must be unlinked or be the root prim of a linkset.|
examples=
examples=
<lsl>
<lsl>

Revision as of 21:11, 6 June 2012

Summary

Function: llEvade( key target, list options );

Characters will (roughly) try to hide from their pursuers if there is a good hiding spot along their fleeing path. Hiding means no direct line of sight from the head of the character (center of the top of its physics bounding box) to the head of its pursuer and no direct path between the two on the navmesh.

• key target group, avatar or object UUID to evade
• list options No options currently available

Caveats

  • Must use llCreateCharacter or script will not 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.
  • If the target is an object, it must be unlinked or be the root prim of a linkset.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> default {

   state_entry()
   {
       llCreateCharacter([CHARACTER_MAX_SPEED, 25, CHARACTER_DESIRED_SPEED, 15.0]);
       //MAX_SPEED is @ 20 by default
   }
   touch_start(integer total_number)
   {
       llEvade(llDetectedKey(0), []);
   }

}

</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function void llEvade( key target, list options );