Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Windows Windows_and_controller  

Windows_and_controller

Window

Put this in the windows;

Category: Windows
By : Emmas Seetan
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Windows_and_controller
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Windows_and_controller_1.lsl
Get file # 2. Windows_and_controller_2.lsl
Get file # 3. Windows_and_controller_3.lsl
1
2 // script that changes opacity of object based on external messages
3
4 integer gChannel = 5; // communication channel on which we listen for opacity change commands
5 integer gLastListen; // id of last listen command
6
7 default
8 {
10 {
11 gLastListen = llListen(gChannel, "", "", "0");
12 }
13
14 listen(integer channel, string name, key id, string msg)
15 {
16 llListenRemove(gLastListen);
17
18 integer nextOpacityLvl = (integer)msg;
19 nextOpacityLvl += 1;
20 if(nextOpacityLvl > 3) nextOpacityLvl = 0;
21 gLastListen = llListen(gChannel, "", "", (string)nextOpacityLvl);
22
23 float opacityLvl = (float)msg;
24 opacityLvl = 1.1 - ((opacityLvl / 3) * 0.9);
25 llSetAlpha(opacityLvl, ALL_SIDES);
26 }
27 }

Windows_and_controller

Window Switch

Put this in a switch;

Category: Windows
By : Emmas Seetan
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

1 // script for a switch that controls window opacity
2 integer gOpacityLevel = 0; // current opacity level of windows
3 integer gChannel = 5; // channel that controls which windows respond to this switch
4
5 default
6 {
8 {
9
10 }
11
12 touch_start(integer num_touchers)
13 {
14 gOpacityLevel += 1;
15 if(gOpacityLevel > 3)
16 {
17 gOpacityLevel = 0;
18 }
19 string opacityCmd = "";
20 opacityCmd = opacityCmd + (string)gOpacityLevel;
21 llSay(gChannel, opacityCmd);
22 }
23 }

Windows_and_controller

How to work it

Category: Windows
By : Emmas Seetan
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

1 When you've put all the window opacity scripts in and done the switch, just click the switch to cycle through transparent and opaque.

Back to the Best Free Tools in Second Life and OpenSim.