llEvade
Revision as of 21:13, 6 June 2012 by Strife Onizuka (talk | contribs) (makes no sense for this one.)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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.
- If the target is an object, it must be unlinked or be the root prim of a linkset.
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>