Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Color change questions

Roundog Tonic
Registered User
Join date: 26 Feb 2005
Posts: 7
06-04-2006 21:41
Im having a problem with a build that i want to have color change sections on. I have a color changer script that works excellent, but it changes the color of ALL the linked prims. i olny want two prims to change color. I have tried linking the object in every way i can think of, changing the parent/ child prims, but it still color changes the entire build. Any one know how to get around this ? Its imperitive that the prims all stay linked.
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
06-05-2006 07:27
There is probably a call to llSetLinkColor for LINK_SET. In order to only change SOME prims, you will have to do multiple calls of llSetLinkColor, one for each prim you want to change. And you will need to know which linknumber each of those prims is. (The other way is to do a link message and have a receiver script in each color-changing prim, but that is more resource intensive).

If you need to find out which linknumber a prim is, drop this script in the prim and touch it. (then remove it when you know which linknum it is).

CODE


default
{
state_entry()
{
}

touch_start(integer total_number)
{
llSay(0, "linknum="+(string)llGetLinkNumber());
}
}



Hope this helps
Baron
Sol Columbia
Ding! Level up
Join date: 24 Sep 2005
Posts: 91
06-05-2006 08:54
To reinforce what Baron was saying, you need to change

llSetLinkColor(LINK_SET, color, ALL_SIDES);

to

llSetLinkColor(specific_link_number_one, color, ALL_SIDES);
llSetLinkColor(specific_link_number_two, color, ALL_SIDES);

Hope that helps some
_____________________
Roundog Tonic
Registered User
Join date: 26 Feb 2005
Posts: 7
06-05-2006 10:05
Awesome thank you both :D