Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Color Changing Script That wont change the WHOLE Object?

Chevonne Wilson
Registered User
Join date: 8 Jul 2006
Posts: 1
07-20-2006 17:08
Does anyone here have a Color Changing Script That wont change the WHOLE Object?
I want to make a few of my pieces in these shoes i made Color changing but all the color change scripts i have seem to change the entire object :(

I only want 2 of the pieces to change color not the whole shoe!!

Pls help someone :)
Thank you!
Tek Harbinger
SS Maggot Elite
Join date: 19 Oct 2005
Posts: 49
07-20-2006 17:12
use

llSetLinkColor(link number, vector color,ALL_SIDES)

I'm pretty sure the parent prim is #1 for link number and so on.
You will need to call the SetLinkColor for every linked prim you want to change.

You might have to play with the numbers to get the right pieces to change colors.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
07-20-2006 17:14
This code is untested. Use it at your own risk.

Put this in the parts that you want to change color:
CODE

default
{
message_linked( integer sender, integer num, string str, key id )
{
if ( num == 5621 )
llSetColor( (vector)str, ALL_SIDES );
}
}


To set the color, send a link message with 5621 as the number and the desired color as the string.

It should work.
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
07-20-2006 17:58
Slightly different approach for situations where it's not necessary to change all prims at exactly the same time...
CODE

set_colour( string Name, vector Value ) {

integer prims_total = llGetNumberOfPrims();
integer i;
for( i = 1; i <= prims_total; ++i ) {

if( llGetLinkName(i) == Name ) { llSetLinkColor( i, Value, ALL_SIDES ); }
}
}

this can be put into single prim, then called e.g. set_colour( "sole", <1.0,1.0,1.0> ) to change colour only for prims in the set that happen to have "sole" as their name.

The upside is no extra scripts idling in the item, the downside is like mentioned, slower response time.
Eata Kitty
Registered User
Join date: 21 Jan 2005
Posts: 387
07-21-2006 04:48
Personally I am currently using a method where you link the object in order (Use Hide Selected in debug, makes this possible instead of impossible!) so you can just do link color/alpha changes from X to Y, it's faster than checking the name of each prim.

It is much slower than having a script in each prim but that has tons of extra script overhead and is really annoying if you want to change things.
Willow Zander
Having Blahgasms
Join date: 22 May 2004
Posts: 9,935
07-21-2006 05:22
Ok, I THINK... I maybe wrong but:

Solur Industries sell a full perms script at $L100 I believe, you put in specific parts of an object to get just those pieces to change colour!

Look for Lur Sachs or Sol Columbia in world, they can be found at Celestial City and Couture Island as well as other places I believe :)
_____________________
*I'm not ready for the world outside...I keep pretending, but I just can't hide...*




<3 Giddeon's <3
Starax Statosky
Unregistered User
Join date: 23 Dec 2003
Posts: 1,099
07-21-2006 07:34
From: Willow Zander
Ok, I THINK... I maybe wrong but:

Solur Industries sell a full perms script at $L100 I believe, you put in specific parts of an object to get just those pieces to change colour!

Look for Lur Sachs or Sol Columbia in world, they can be found at Celestial City and Couture Island as well as other places I believe :)


What the hell are you doing in here? Are you lost?
Tek Harbinger
SS Maggot Elite
Join date: 19 Oct 2005
Posts: 49
07-22-2006 02:25
I'm pretty sure that was sarcasm. ;)
Willow Zander
Having Blahgasms
Join date: 22 May 2004
Posts: 9,935
07-22-2006 02:27
From: Starax Statosky
What the hell are you doing in here? Are you lost?


Why, Starax! I was looking for you! *licks*
_____________________
*I'm not ready for the world outside...I keep pretending, but I just can't hide...*




<3 Giddeon's <3