Skip to content
lsl.devlsl.devLSL Dev

LlEvade

Looking for the current API? Open the llEvade reference →

Wiki description

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.

Caveats

  • Must use llCreateCharacter or script will shout an error "You must call llCreateCharacter before llEvade.".
  • If the target is an object, it must be unlinked or be the root prim of a linkset.

Examples

vector start_position;

default
{
    on_rez(integer start_param)
    {
        llResetScript();
    }

    state_entry()
    {
        llDeleteCharacter();
        llCreateCharacter([CHARACTER_MAX_SPEED, 25, CHARACTER_DESIRED_SPEED, 15.0]);

        start_position = llGetPos();
        llWanderWithin(start_position, <10.0, 10.0, 2.0>, [] );
    }
 
    touch_start(integer num_detected)
    {
        llEvade(llDetectedKey(0), []);
        llSetTimerEvent(20.0);
    }

    timer()
    {
    //  do not keep running away...
        llSetTimerEvent(0.0);

        llWanderWithin(start_position, <10.0, 10.0, 2.0>, [] );
    }
}

See also: functions

See also: events

History

Date of Release 31/07/2012

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:LSL Function/uuid

Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:

{{#vardefine:p_{{{1|none}}}_desc|{{#if:{{{pd|}}}|{{{pd|}}}&#32;}}{{#if:{{{group|1}}}|{{LSLGC|Group|group}},&#32;}}{{LSLGC|Avatar|avatar}} or {{#if:{{{object|}}}|[[object]]|[[prim]]}} {{HoverLink|UUID|Universally Unique Identifier}} {{#if:{{{sim|}}}|that is in the same [[region]] {{#switch:{{{sim|}}}|*=|#default = &#32;{{{sim|}}}}}
}}}}

{{#vardefine:p_{{{1|none}}}_hover|{{#if:{{{ph|}}}|{{{ph|}}}&#32;|{{#if:{{{pd|}}}|{{{pd|}}}&#32;}}}}{{#if:{{{group|1}}}|group,&#32;}}avatar or {{#if:{{{object|}}}|object|prim}} UUID {{#if:{{{sim|}}}|that is in the same region {{#switch:{{{sim|}}}|*=|#default = &#32;{{{sim|}}}}}
}}}}

<includeonly>
{{#ifeq:{{#var:article-type}}|event||{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{LSLC|Avatar/As A Parameter}}
}}}}}}
</includeonly>

}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|none}}}_desc}}
|-
|hover
|{{#var:p_{{{1|none}}}_hover}}
|}
</noinclude>
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlEvade, by Linden Research, Inc. and contributing residents.View contributors and history.

Built from these wiki pages, as imported:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.