Don't click here unless you want to be banned.

LSL Wiki : llListenRemove

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
llListenRemove(integer number)

Removes the listen event callback with the handle number. The handle is the value returned when calling llListen.

Invalid handles are ignored, which means the following example works fine:
integer Channel;
integer Handle;

Init() {
    Handle = llListen(Channel, "", NULL_KEY, "");

default {
    state_entry() {
        Channel = 2; // first we listen on channel 2

    touch_start(integer total_number) {
        Channel = 4; // after a touch we listen on channel 4 instead
    listen(integer channel, string name, key id, string message) {
        llSay(0, llList2CSV([channel, name, message]));

Remember, listeners are automatically removed when exiting a state. This means that llListenRemove is only necessary when removing a listen inside a state. If your script design permits it, using multiple states instead of a llListenRemove may be more convenient.

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

Functions | Chat | Communication | llListen | listen
There are 7 comments on this page. [Display comments/form]