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
Color Color_generator  

Color_generator

Color generator.lsl

Category: Color
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Color_generator
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Color_generator_1.lsl
1
2 integer toggle = 0; // This is our toggle switch for turning the
3 // script on and off. 0 is off, 1 is on.
4
5 float base_delay = 1.0; // This is the minimum amount of delay
6 // that will happen between color changes.
7 // If you want a consistently longer or
8 // shorter delay, change this value.
9
10 float variable_delay = 1.5; // This is the maximum delay added to
11 // the base_delay. If you want a wider
12 // variation in the delay, then increase
13 // the value. If you want less variance.
14 // then decrease it.
15
16 default
17 {
18 touch_start(integer counter)
19 {
20 toggle *= -1; // Here we multiply negative one, to change its
21 // sign.
22
23 if(toggle < 0) // We test to see if it is less than 0, and if it
24 // is, then we turn on the color changer.
25 {
26 llSetTimerEvent(llFrand(variable_delay) + base_delay);
27 }
28 else
29 {
31 }
32 }
33
34 timer()
35 {
37 llSetTimerEvent(llFrand(variable_delay) + base_delay);
38 }
39 }
40
41 // END //

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