Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

setting colors for a custom color HUD and then setting ave colors(only turns black)

RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
05-12-2006 00:14
so far...as I can see, it should be working

lets say the command is /33 fur1 <1,1,1>, and that part works fine...but I am using a HUD that takes the color that the button is and puts that as the vector part of the command, in string format of course...

To do this, I am using this line of code


touch_start(integer total_number)
{
llSay(33,llDumpList2String(["fur1",llGetColor(ALL_SIDES)]," ";));
}



maybe there is one thing I am leaving out...as I am sometimes overlooking things. But, this one baffles me....... even when I say on channel 0, it says the command....seriously.. WTF????
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
05-12-2006 01:15
I think you were wrong in the usage of the list.
I guess you wanted to do like this.

llSay(33, "fur1 " + (string)llGetColor(ALL_SIDES));
_____________________
:) Seagel Neville :)
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
05-12-2006 01:55
ok, I just figured it out........ I need ot find a way to round to only one decimal place like 0.2 not .233333333 otherwise it just sets it as black.......which is kinda odd...... trouble is, its only a round t0 the nearest integer, not decimal places...... unless i'm missing something

edit:

no, its something else that is not working
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
05-12-2006 02:25
Aha, that's true...
What about this? :D

vector ColorVec = llGetColor(ALL_SIDES);
string X = (string)ColorVec.x;
string Y = (string)ColorVec.y;
string Z = (string)ColorVec.z;

llSay(33, "fur1 <" + llGetSubString(X, 0, 2) + ", " + llGetSubString(Y, 0, 2) + ", " + llGetSubString(Z, 0, 2) + ">";);
_____________________
:) Seagel Neville :)
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
05-12-2006 03:36
I use this a lot:

http://secondlife.com/badgeo/wakka.php?wakka=ExampleArgumentMultiplexing

Only real gotcha! is you need to use llList2String and cast it to the right data type, but I do that to vectors without problems.