llMinEventDelay

From Second Life Wiki
Revision as of 11:26, 1 October 2022 by Gwyneth Llewelyn (talk | contribs) (Replaced <source> with <syntaxhighlight>; changed the <pre> to {{Samp}} since that way some semantic meaning is retained)
Jump to navigation Jump to search

Summary

Function: llMinEventDelay( float delay );
0.0 Forced Delay
10.0 Energy

Set the minimum time between events being handled.

Defaults and minimums vary by the event type, see LSL Delay.

• float delay time in seconds

Caveats

minimum delay is maintained between state changes.

Examples

default
{
    state_entry()
    {
        llMinEventDelay(5.0);
    }
    touch(integer detected)
    {
        llSay(0, "Touched.");//Without the event delay set touch would cause the screen to fill 
                             //with the word "Touched" in a split second if you held the mouse button down.
    }
}

Where as, if in one object you place this script (for the sake of fun call the object "Sandy Powell"). -

default
{
    touch(integer detected)
    {
        llSay(0, "Can you hear me mother?");//Northern English accent. Catch phase of Sandy Powell (comedian).
    }
}

and this in another object called "Mother" -

default
{
    state_entry()
    {
        llMinEventDelay(5.0);
        llListen(0, "Sandy Powell", "", "");
    }
    listen(integer chan, string name, key id, string msg)
    {
        llSay(0, "Eh?");
    }
}

the result in chat is as follows -

Template:Sampbox

and no more events are triggered. This is an example of lost transferred info because of llMinEventDelay so be careful with it.

See Also

Articles

•  LSL Delay for default values

Deep Notes

Signature

function void llMinEventDelay( float delay );