Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llListenRange

Olmy Seraph
Valued Member
Join date: 1 Nov 2004
Posts: 502
03-09-2005 22:40
Simple concept: a listener that listens to a range of chat channels.

llListenRange(integer channelFrom, integer channelTo, string name, key id, string msg)

Why? I want to make a listener that uses the channel number to encode metadata about a dialog response, in order to make an item that allows multiple avs to interact with it at the same time. But I don't want to bog down the listener with chatter on channel 0.

For now the first line in the listen handler will do a trivial reject and if the channel is 0, but I'd rather not get the event at all in that case.
_____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
03-10-2005 08:12
could be wrong but from what i've seen Lindens say about listens it sounds like they listen to every bit of chat in a sim no matter what channel it's on and what channel they're set to so this probly wouldn't make any difference as far as lag without redoing the whole listen system.
_____________________
Zuzi Martinez: if Jeska was Canadian would she be from Jeskatchewan? that question keeps me up at nite.
Jeska Linden: That is by far the weirdest question I've ever seen.
Olmy Seraph
Valued Member
Join date: 1 Nov 2004
Posts: 502
03-10-2005 09:06
From: Zuzi Martinez
could be wrong but from what i've seen Lindens say about listens it sounds like they listen to every bit of chat in a sim no matter what channel it's on and what channel they're set to so this probly wouldn't make any difference as far as lag without redoing the whole listen system.


Hotline thread /invalid_link.html says otherwise. From Kelly Linden's explanation, it looks like chats are matched by channel before checking distance and other criteria. Doing a simple test like "x < a & x > b" is faster than checking distance, and probably a lot faster than invoking a listen handler. It's hard to say how much of a performance improvement this may be, but it would probably make a difference.

I guess another way of doing this that would be less flexible would be llListenPrivate, which would listen on all non-zero channels. It avoids the public chat, and lets the listen handler use the channel number to process different message types.
_____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
03-10-2005 11:25
Yeah, an llListenRange command would be nice. Presently listeners function much like how clients "hear" something - so, for example, llShout can only be heard within 100m or so.

Alternately, llListenIgnore(list keys) would rock for saving processing time in potentially chat-intensive regions.
_____________________
---
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
03-10-2005 11:28
Incidentally, how can I add that to the wiki? Seems like everytime I try to put something in there, it tells me I'm not authorized :(

CODE

for (recent chat messages on channel)
if (too_old) continue
if (our_chat) continue
if (too_far_away) continue
if (id_doesn't_match) continue
if (name_doesn't_match) continue
if (message_doesn't_match) continue


--Jack Lambert
_____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you.

-Chip Midnight