Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with light script/menu driven and slavescript

Zigadena Gabardini
Registered User
Join date: 2 Jan 2008
Posts: 27
06-02-2009 03:41
I have a script, good thing,menudriven, works fine .Has a slave script (here called Child but I guess its the same.This is all functioning well as long as I only want the script to rule over one linked prim in my creation. Its a switcher-base script in root prim)/a light script and a child/slave script /both in 3 other prims(lamps)
So I have 3 different linked prims.
Now i have to click the menu 3 times to/ex: change the color, intensity etc

Is it possible to make it do this on all 3 at once?
grateful for answer

ps I tried changing the rot prim to

llSetLinkPrimitiveParams(LINK_ALL_CHILDREN,[PRIM_COLOR,ALL_SIDES,<1.0,1.0,1.0>,1.0]);


now they all go back to white at the same time..
but i still have the same problem with colors, i have to change them one by one..
this is the original code from the switcher/root prim
default
{

touch_start(integer total_number)
{
llMessageLinked(LINK_SET, 1, "", llDetectedKey(0));
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-02-2009 04:06
presuming they're all being set to the same color and the root prim is the only one that isn't being changed, the same trick should work...

but from the sound of it, either in the dialog it has you select the target (case 1) or you have to touch the specific light to get the dialog for that light to be changed (case 2 )

case 1 solution
instead of having it select the target prim, skip over that code and use -2 (ALL_OTHERS) or -3 (ALL_CHILDREN) as the default

case 2 solution
the target prim is being selected based on it's link number in either the touch, or link message event... either way, kill that code, and use one of the above constants instead.
_____________________
|
| . "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...
| -
Zigadena Gabardini
Registered User
Join date: 2 Jan 2008
Posts: 27
06-03-2009 05:34
:)Thanks for your quick and nice answer .


Im just to stupid I cant get it to work with this either
no 2 is the case , no 1 gave no reaction
But my problem is that now when i kill the link"
link_message(integer linknum, integer num, string str, key id)
{
i only get error..guess this is impossible then
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-03-2009 18:23
somewhere in that incoming link code, there is something that looks like
variable = linknum;
or some other repeat of the variable name linknum...

replace any reference after the first with LINK_ALL_CHILDREN
_____________________
|
| . "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...
| -