Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Looking for Touch-tinted Privacy Glass...

Oceas Shark
Registered User
Join date: 7 Feb 2005
Posts: 17
02-22-2005 20:43
Can anyone offer some help with making "privacy glass" that can have 3 stages of tint on the outside?

Thanks!
Alan Palmerstone
Payment Info Used
Join date: 4 Jun 2004
Posts: 659
02-22-2005 21:10
From: Oceas Shark
Can anyone offer some help with making "privacy glass" that can have 3 stages of tint on the outside?

Thanks!


CODE
list translevels = [1.0,0.50,0.1];
integer levellist = 0;

default
{
state_entry()
{
llSay(0, "script started");
}

touch_start(integer total_number)
{
levellist++;

if (levellist + 1> llGetListLength(translevels))
{
levellist = 0;
}
llSetAlpha(llList2Float(translevels, levellist), ALL_SIDES);

}
}


If you put this code as a script in an item, like a piece of glass, set the texture to default and the color to black, it will click through black (1.0), gray(0.5) and really light gray(0.1). You can add as many transition levels as you want.

Hope this helps.
_____________________
Visit Parrot Island - relax on the beach, snuggle at the waterfall, ride the jetskis, make a movie and buy a pool!
Oceas Shark
Registered User
Join date: 7 Feb 2005
Posts: 17
02-22-2005 21:50
Thanks a lot!
Oceas Shark
Registered User
Join date: 7 Feb 2005
Posts: 17
02-23-2005 01:10
Hey, this script is cool , except that it doesn't seem to loop back to the beginning (transparent).
Alan Palmerstone
Payment Info Used
Join date: 4 Jun 2004
Posts: 659
02-23-2005 07:45
From: Oceas Shark
Hey, this script is cool , except that it doesn't seem to loop back to the beginning (transparent).


I just dropped a "Privacy Window" object on you in game that has that script in it and cycles through the three levels in the first line of the script.

CODE
list translevels = [1.0,0.50,0.1];


1.0 = Black
0.50 = Gray
0.1 = Light Gray

If you change the 0.1 to 0.0 or change the list to

CODE
list translevels = [1.0,0.50,0.1,0.0];


it should add

0.0 = fully transparent

to the cycle.
_____________________
Visit Parrot Island - relax on the beach, snuggle at the waterfall, ride the jetskis, make a movie and buy a pool!
Oceas Shark
Registered User
Join date: 7 Feb 2005
Posts: 17
02-23-2005 13:21
Thanks a lot!

I'm trying to learn how this code works. I've never been much of a programmer besides being skilled enough in ColdFusion to make a full shopping cart / ecommerce system, so this java-looking stuff is all new to me.
Beta Rubio
A Cityfied Country Boy
Join date: 3 Jun 2004
Posts: 36
03-01-2005 06:48
I used this last night for windows in my house; works wonderfully!!
_____________________
:)
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
03-01-2005 10:56
By the way, if you have a lot of glass, and it is spread over a wide area of your house, please consider using Linked messages, or even e-mail to make the changes.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts