Jump to content

llListenRemove


Innula Zenovka
 Share

You are about to reply to a thread that has been inactive for 4168 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Someone asked me to help them tweak a script they'd bought, which I did, and while I was so doing, I noticed something I've never seen before.

The script was switching between listening to the owner on integer chat_channel and integer dialog_channel, depending on whether there was a menu open or not.   Now, when I do this, I have a global called integer handle, and then say

llListenRemove(handle);
handle = llListen(dialog_channel,"",owner,"");
// or
handle = llListen(chat_channel,"",owner,"");

 as appropriate, which is how I learned to do it from the old lsl wiki.

The way this script did it, though, was  on the lines of

 

llListen(-999,"",owner,"");//open the dialog listener
//and then
llListenRemove(-999);//to close it

I don't think anything gets closed that way, and I've certainly never seen it done like that.  

I thought the integer you remove in llListenRemove(integer number) was the callback number and nothing to do with the channel.   However, the original script was clearly written by someone who was reasonably competent, so I'm wondering if it's a shortcut I didn't know about.

 

 

Link to comment
Share on other sites

oh I wish we could do something like that... unfortunately it'd cause massive conflicts as is with the integer based handles we get now.... some scheme like that could work if the listen handle spit out keys, and they put in some logic to close all the KEY handles with matching channels when listen remove got an integer.... I doubt such a setup will ever occur though

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4168 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...