LlListenControl

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llListenControl( integer number, integer active );
26 Function ID
0.0 Delay
10.0 Energy

Makes listen event callback number active or inactive

• integer number
• integer active boolean

Caveats

Search JIRA for related Bugs

Examples

a small example of an on and off switchable listen by use of llListenControl()

 
integer handle;
integer toggle;
default
{
    state_entry()
    {
       handle = llListen(5,"", NULL_KEY, "");
       llListenControl(handle, FALSE);
       llSetText("not listening", <0.0,0.0,0.0>,1.0);
    }
 
    touch_start(integer total_number)
    {
        toggle=!toggle;
         llListenControl(handle, toggle);
        if(toggle){
            llSay(0,"now listening on channel 5");
            llSetText("listening on ch 5", <1.0,0.0,0.0>,1.0);
        }
        else{
            llSay(0,"not listening any more");
             llSetText("not listening", <0.0,0.0,0.0>,1.0);
        }
 
    }
 
    listen(integer channel, string name, key id, string message)
    {
        llSay(0, name+" just said "+message);
    }
}
 

See Also

Events

•  listen

Functions

•  llListen
•  llListenRemove

Deep Notes

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages