Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help with a tint script

Porky Gorky
Temperamentalalistical
Join date: 25 May 2004
Posts: 1,414
06-14-2007 05:56
Hello, I have a mental scripting deficiency im afraid, so apologies for presenting a quetion like this at my age.

I have a window tint script, please see an excerpt below:

}
else if (llDetectedKey(0)==llGetOwner())
{
tl=0;
llSetTexture(text,ALL_SIDES);
llSetColor(<1,1,1>, ALL_SIDES);
llSetAlpha(0.5, ALL_SIDES);
llSetPrimitiveParams([PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_NONE,PRIM_BUMP_NONE]);
}

Regarding the line "llSetAlpha(0.5, ALL_SIDES);" this currently applies 50% transparency to all sides of a prim. I want to be able to apply a different level of transparency to different sides of a prim. If possible can someone please change the example above to demonstrate how I can achieve this?

Thanks in advance, Porky.
_____________________
Jim Guyot
Tinkerer
Join date: 21 Apr 2007
Posts: 38
06-14-2007 07:32
You will have to call llSetAlpha for each side of the prim to set different alphas.

llSetAlpha( 0.5, 0 );
llSetAlpha( 1.0, 1 );
llSetAlpha( 0.0, 2 );
llSetAlpha( 0.25, 3 );

and so forth.
Porky Gorky
Temperamentalalistical
Join date: 25 May 2004
Posts: 1,414
06-14-2007 09:19
From: Jim Guyot
You will have to call llSetAlpha for each side of the prim to set different alphas.

llSetAlpha( 0.5, 0 );
llSetAlpha( 1.0, 1 );
llSetAlpha( 0.0, 2 );
llSetAlpha( 0.25, 3 );

and so forth.


Thanks Jim. So it should look like this?:

}
else if (llDetectedKey(0)==llGetOwner())
{
tl=0;
llSetTexture(text,ALL_SIDES);
llSetColor(<1,1,1>, ALL_SIDES);
llSetAlpha( 0.5, 0 );
llSetAlpha( 1.0, 1 );
llSetAlpha( 0.0, 2 );
llSetAlpha( 0.25, 3 );
llSetAlpha( 0.5, 4 );
llSetAlpha( 1.0, 5 );
llSetPrimitiveParams([PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_NONE,PRIM_BUMP_NONE]);
}
_____________________
Jim Guyot
Tinkerer
Join date: 21 Apr 2007
Posts: 38
06-14-2007 13:26
That looks like it should work. Just make sure to double check the faces so you are making the tint on the right ones. Ctrl-alt-Shift-T does the trick when you have a face selected via select texture.