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
Light neon_light_script__touch_on_off_ful  

neon_light_script__touch_on_off_ful

neon light script - touch on_off, fully adjustable.lsl

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

the Zip file

Download all files for neon_light_script__touch_on_off_ful
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. neon_light_script__touch_on_off_ful_1.lsl
Get file # 2. neon_light_script__touch_on_off_ful_2.lsl
1
2 vector color = <1,1,1>; // Use to change the color of the light
3 float intensity = 1.000; // Use to change the intensity of the light, from 0 up to 1
4 float radius = 10.000; // Use to change the Radius of the light, from 0 up to 20
5 float falloff = 0.750; // Use to set the falloff of the light, from 0 up to 2
6
7 // Everything below here is just script stuff, you don't have to mess with it unless you know what you are doing.
8
9 integer g_OpenNow; // True (1) if light is on now
10
11 default
12 {
13 on_rez(integer param)
14 {
16 }
17
19 {
20 llSay(0, "touch to turn on and off");
21 if(g_OpenNow == TRUE)
22 {
23 state WaitToClose;
24 }
25 else
26 {
27 g_OpenNow = FALSE;
28 state WaitToOpen;
29 }
30 }
31 }
32
33 state WaitToClose // light is off waiting to turn on
34 {
35 touch_start(integer total_number)
36 {
37 llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]);
39 g_OpenNow = FALSE;
40 state WaitToOpen;
41 }
42 }
43
44 state WaitToOpen // light is on, waiting to turn off
45 {
46 touch_start(integer total_number)
47 {
48 llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, color, intensity, radius, falloff]);
50 g_OpenNow = TRUE;
51 state WaitToClose;
52 }
53 }// END //

neon_light_script__touch_on_off_ful

a version that blinks

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

1 vector color = <1,1,1>; // Use to change the color of the light
2 float intensity = 1.000; // Use to change the intensity of the light, from 0 up to 1
3 float radius = 10.000; // Use to change the Radius of the light, from 0 up to 20
4 float falloff = 0.750; // Use to set the falloff of the light, from 0 up to 2
5
6 // Everything below here is just script stuff, you don't have to mess with it unless you know what you are doing.
7
8 integer flag = 0;
9
10 on()
11 {
12 llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, color, intensity, radius, falloff]);
14 g_OpenNow = TRUE;
15 }
16
17 off()
18 {
19 llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75]);
21 g_OpenNow = FALSE;
22 }
23
24 integer g_OpenNow; // True (1) if light is on now
25
26 default
27 {
28 on_rez(integer param)
29 {
31 }
32
34 {
35 llSay(0, "touch to turn on and off");
36 if(g_OpenNow == TRUE)
37 {
38 state WaitToClose;
39 }
40 else
41 {
42 g_OpenNow = FALSE;
43 state WaitToOpen;
44 }
45 }
46 }
47
48 state WaitToClose // light is off waiting to turn on
49 {
51 {
53 }
54
55 timer()
56 {
57 if($flag++ %2 == 0 )
58 on();
59 else
60 off();
61 }
62
63 touch_start(integer total_number)
64 {
65 off();
66 state WaitToOpen;
67 }
68 }
69
70 state WaitToOpen // light is on, waiting to turn off
71 {
72
73
74
75
76
77 touch_start(integer total_number)
78 {
79 on();
80 state WaitToClose;
81 }
82 }

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