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
Random Broken_fluorescent_light_script  

Broken_fluorescent_light_script

Broken_fluorescent_light_script

Category: Random
By : oddyotoole
Created: 2011-08-05 Edited: 2011-08-05
Worlds: Second Life

the Zip file

Download all files for Broken_fluorescent_light_script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Broken_fluorescent_light_script_1.lsl
1 //--------------------------------------
2 // Random Prim Glow (on/off) and lightning (on/off
3 // By Oddball Otoole
4 //--------------------------------------
5 // This program is free software; you can redistribute it and/or modify it.
6 // License information must be included in any script you give out or use.
7 // This script is licensed under the Creative Commons Attribution-Share Alike 3.0 License
8 // from http://creativecommons.org/licenses/by-sa/3.0 unless licenses are
9 // included in the script or comments by the original author,in which case
10 // the authors license must be followed.
11
12 //-------------------------------------
13 //Global Variables
14 float glow;
15 float time;
16
17 //-------------------------------------
18 // Main program
19 default
20 {
22 {
23 llSetColor(<1.0, 1.0, 1.0>, ALL_SIDES);
24 state begin;
25 }
26 }
27
28 //-------------------------------------
29 // Begin state
30 state begin
31 {
33 {
34 glow = (integer) llRound(llFrand(1)); // Random on or off
35 time = (float) llFrand(2); // Random wait time
36 llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, glow]); //Set Prim glow on/off
37 llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1.0, 1.0, 1.0>, glow, 5.0, 0.5]); // Set prim light on/of
38 state wait; // Go to the Wait State
39 }
40 }
41
42 //-------------------------------------
43 // Wait state
44 state wait
45 {
47 {
48 llSleep(time); //Wait
49 state begin; // Go back to the Begin State
50 }
51 }

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