Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Really, really simple window blinds script

Poppet McGimsie
Proprietrix, WUNDERBAR
Join date: 28 Jul 2006
Posts: 197
10-26-2006 19:05
Follow the instructions inside the script below to create windows that have blinds you can open and close. Privacy is built-in, because the script works only for the owner of the window. It's crude, it's inelegant, but it's simple and it does the job!


//Simple 3-state tintable windows script
//Poppet McGimsie. 10/26/2006

//rez a prim and shape it the way you want (a good place to start getting your head around this script is to make a prim with the dimensions x=1.5, y=0.2 and z=1.5). Scale textures on the faces of the prim the way you want or need them to be either now or later on whenever you want.

//drop this script in your prim's contents and open the script by rightclicking it and selecting "open"

//enter the uuid's of the textures you wish to use for the 6 sides (0 to 5) of your prim for the "open" and "closed" blinds states, where indicated below. The ones I've provided are pretty ugly, so no doubt you'll want to change them.

//save the script to compile and use it by clicking the save button.

//this script is offered for free use, and must stay that way. It should always retain the permissions of yes modify/ yes copy / yes transfer whenever it is used. It should not be sold except as a part of an object that uses it as a script.

//Place your own UUIDs here for to suit your taste. To find the UUID's, open your inventory and rightclick on the texture you want to use and choose "copy Asset UUID." Paste the UUID between the quotation marks. Note that the ordering of the UUIDs here assume that sides 1 and 3 are the window's inside and outside faces, respectively. The other 4 sides are assumed to be the edges of the window (i.e. the parts that are inside the walls)

//open blind textures
key open0 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key open1 = "e192ebd8-b92b-8557-ec19-15f4f70e77eb";
key open2 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key open3 = "996a74c9-b1cb-d358-23a5-04c888357088";
key open4 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key open5 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";

//closed blinds textures:
key closed0 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key closed1 = "e509fac6-4247-a4c9-db8d-1041d125a731";
key closed2 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key closed3 = "cd78006a-32ba-cd04-be73-3f2f6f82b1bf";
key closed4 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";
key closed5 = "c2216819-cea6-eb1c-b7c2-5b1f3f8472ad";

//reset blinds textures: these textures show the numbering on the sides of the cubes, and you probably will want to leave them the way they are.
key reset0 = "06491157-f9a8-0077-eb4b-312615774a19";
key reset1 = "deb2b70d-dac0-8bee-91ed-0256838bc25b";
key reset2 = "de0c3d34-b6cb-b047-f592-968a285c5719";
key reset3 = "3c6b3170-0892-824e-cc75-484ae541aec0";
key reset4 = "3f5ba16d-4632-31e3-bcc3-2b6d1f549040";
key reset5 = "e4dc95a5-5402-9aaa-deaa-3064f099ddd4";

key owner;

integer iChan = 1234;
// channel door will listen for instructions from owner. You can change it but don't forget to change the message down below to go along with the new number

touch_start(integer num_detected)
owner = llGetOwner();
llOwnerSay("Say /1234 open, /1234 close or /1234 reset ");//change this line if you change the channel number

listen(integer iChan, string name, key id, string msg)
if (iChan == 1234 && id == owner && msg == "open")
llWhisper(0,"Opening shades...");
state open;
if (iChan == 1234 && id == owner && msg == "close")
llWhisper(0,"Close shades...");
state closed;
if (iChan == 1234 && id == owner && msg == "reset")
llWhisper(0,"Resetting window...");
state reset;


state open
state default;

state closed
state default;
state reset
state default;

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
10-27-2006 08:58
i've got nothing. ;)