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
Texture MitzFader  

MitzFader

he MitzFader

This script will allow you to fade an object to a specific alpha between 0 and 100.
The transition effect is fairly smooth, and can be adjusted to your liking.
The script is written so that a chat command controls the action, but this can be changed to allow for other types of control, such as a Dialog Box, touch command, ect.

Category: Texture
By : Mitzpatrick Fitzsimmons
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for MitzFader
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. MitzFader_1.lsl
1 // Fader by Mitzpatrick Fitzsimmons
2
3 // Place this script inside the object you wish to "fade"
4
5 //---------------------------------------------------------
6 // NOTES
7 // You can control (somewhat) how fast or slow your fader works by editing the float v variable
8 // which is set as (i * 0.01) by default.
9 // Change the 0.01 value to your liking (HINT: 0.02 will fade 2x faster than 0.01)
10 // You can also change the fade and fadeset values too...just remember to change your float too!
11
12 // SCRIPT
13
14 integer fadeset = 0;
15 integer fade = 100;
16
17 fade_up()
18 {
19 float i;
20 for (i =fadeset; i < fade; i++)
21 {
22 float v = i * 0.01;
24 }
25 }
26
27 fade_down()
28 {
29 float i;
30 for (i =fadeset; i > fade; i--)
31 {
32 float v = i * 0.01;
34 }
35 }
36
37 default
38 {
40 {
41 llOwnerSay("Type 'fade #' where # is between 0 and 100");
42 llListen(0,"",llGetOwner(),"");
43 llListen(1,"",llGetOwner(),"");
44 }
45
46 on_rez(integer num)
47 {
49 }
50
51 listen(integer number, string name, key id, string message)
52 {
53 if(llGetSubString(message, 0, 4) == "fade ")
54 {
55 fadeset = fade;
56 fade = (integer) llGetSubString(message, 5, -1);
57 if(fadeset < fade)
58 {
59 fade_up();
60 }else{
61 fade_down();
62 }
63 fadeset = fade;
64 }
65 }
66
67 }

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