Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Channels...This isn't about voice, but... :-)

Dagmar Kohime
Yep, I'm good with that!
Join date: 14 Apr 2007
Posts: 110
08-05-2007 11:42
...I've been searching for some general info about SL channels and have had no luck.
Can someone help me understand channels? I have several scripts that ask you to "pick a channel" for the script to operate on, and I have no idea. Appreciate any info or leads about what I KNOW is basic knowledge (I just can't find it :-l )
peace,
-Dag
_____________________
"Ruprecht loves the wide open spaces"
Johnny Rambler
Dances on Broken Glass
Join date: 27 Mar 2005
Posts: 69
08-05-2007 11:59
From the Wiki:

Chat communication is as it sounds. It is text "said" so that anyone within range can hear it. Only chat sent on channel 0 is openly visible to avatars in the area, but any script can listen to any chat on any channel. Agents can only chat on positive channels, but scripts can chat and listen on any channel between 1 and 2147483647.
Oryx Tempel
Registered User
Join date: 8 Nov 2006
Posts: 7,663
08-05-2007 12:09
Lots of bling, color changing shoes, and stuff listens on the lower numbered channels, like /1, /5, and many dance balls listen to /99. So if you have an uncommon script that you won't be accessing a whole lot, and if you do wear/use stuff that might use those common channels, or you plan to sell this item, pick a number that won't conflict with a lot of other items' channels. ;)
_____________________
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
08-05-2007 12:11
(This may be *too* basic, but just in case...) By default, avatars use channel 0: if you type into chat, that's where it goes, and that's the only channel that nearby avatars see in chat.

You can chat on a different channel by preceding the chat text with "/" and the channel number. So, "/1hide" says "hide" on channel 1. An avatar can't see that chat, but a poseball (for example) listening on channel 1 can.

Most scripted objects talking to each other use channels with very large (positive or negative) values, to minimize likelihood of cross-talk. But when listening for user commands, usually a small positive channel is used, for user convenience.

It's considered very bad form for an object to listen on channel 0 for user input because it then will have to process everything said in open chat, which causes (some) server lag.
Dagmar Kohime
Yep, I'm good with that!
Join date: 14 Apr 2007
Posts: 110
Thanks All...
08-06-2007 07:20
...you have been most helpful. As I said...I know this is very basic info, and I'm wondering why it's not more available for new folks to learn from.

-Dag
_____________________
"Ruprecht loves the wide open spaces"
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
08-06-2007 07:26
By the way, most people seem to choose odd numbers for non-zero scripted communications. I am not sure why, but that has been my observarion. So an even number like 44 propaply has less chance of conflicting with nearby stuff than an odd number does.

Even if two scripted items are on the same channel, the commands you send on that channel are probably different. So if my prim hair and my prim shoes both listen for "/44 color MidnightBlue", they would both respond and change when I only wanted to change one. But more likely they will either be on different channels or will use a different command syntax.

You can also cut down on conflicts by having the scripted objects only respond to their owner. Especially if it is for an attachment, where only the owner should be able to command it. On the other hand, if multiple people need to give commands, like a light switch for a lamp, then you can't restrict the commands to owner only.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.