Difference between revisions of "LlEvade"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
Jonathan Yap (talk | contribs) m (Add ( after llDetectedKey) |
|||
Line 22: | Line 22: | ||
touch_start(integer total_number) | touch_start(integer total_number) | ||
{ | { | ||
llEvade( | llEvade(llDetectedKey(0), []); | ||
} | } | ||
} | } |
Revision as of 08:50, 17 February 2012
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 | – | Agent or object to evade | |
• list | options | – | No options currently available |
Caveats
- Must use llCreateCharacter or 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.
Examples
<lsl> default {
state_entry() { llCreateCharacter([CHARACTER_DESIRED_SPEED, 35.0]); }
touch_start(integer total_number) { llEvade(llDetectedKey(0), []); }
}
</lsl>