Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

prim color setting is ignored

Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
12-23-2006 15:20
Hi,

I made some curtains with the following script:

default
{
state_entry()
{
llListen(4, "", NULL_KEY, "" );
}

listen(integer channel, string name, key id, string message)
{
if(message == "private";)
{
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <255,255,128>,1.0]);
}
if(message == "open";)
{
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <255,255,128>,0.8]);
}
}
}

Should be pretty straightforward, right? Well, funnily enough, the script sets the color to 255,255,255 instead of 255,255,128. And of course, as usual, I have no idea why. Can anyone help?

Thanks -- Dylan
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-23-2006 15:50
colour vectors are 0-1 not 0-255 try <1,1,0.5> instead of <255,255,128>
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
12-24-2006 01:10
Thanks!