|
Toby Lancaster
Registered User
Join date: 28 Feb 2007
Posts: 14
|
06-22-2009 23:45
I've built a simple communications device that currently uses a channel number hardcoded in the script. Is there a way to set up some sort of configuration so that a user can choose their own channel number?
I don't want the user to be able to edit the script, and I'd prefer not to have separate config notecards in the send and receive prims. Is there a clever way to configure both at once?
Toby
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-23-2009 00:17
yes...
either have it as a command that is recieved on the default channel, configure it from a notecard, or even from the prim description field.
the configuring item can send the updated channel on the default channel before switching over.
a way to get a more individual channel if it'll only be used for a single owner is to use the following
channel = (integer)("0x" + llGetSubstring( llGetOwner(), 0, 0 );
which will be a fairly high channel (could be positive or negative), that will most likely not be shared by any other Av in the local area (unless your habit is to stand in the welcome area)
it's purpose isn't really to guarantee uniqueness, but rather to help selecting a channel that isn't likely to be used by many other people in the local vicinity, so that you aren't filtering much garbage from the channel
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Toby Lancaster
Registered User
Join date: 28 Feb 2007
Posts: 14
|
06-23-2009 00:59
Thanks Void!
So the standard approach with configuring multi-prim objects is to use a dedicated channel for transmitting config details?
Toby
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-23-2009 18:23
From: Toby Lancaster Thanks Void!
So the standard approach with configuring multi-prim objects is to use a dedicated channel for transmitting config details?
Toby it's simplest... you can start with the default and change it by user command or by primary object update... it's always good to have a default for resets, and a way to reset it.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|