Join us in Phaze Demesnes

LSL Script Library Home   Add a script Show All
Category: Contributor: Description
Light Anonymous listener.lsl
this script turns a light on and off
listener.lsl

Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.

1 // CATEGORY:Light
2 // DESCRIPTION:this script turns a light on and off
3 // ARCHIVED BY:Ferd Frederix
4
5 float MAX_RADIUS = 2.5 ;// default
6
7 integer channel = 99;
8
9 default
10 {
12 {
13 llOwnerSay("Change radius with /" + (string) channel + " number, like '/" + (string) channel + " 5.0' for 5 meter radius");
14 llListen(channel, "", llGetOwner(), "");
15
16 }
17 listen( integer channel, string name, key id, string message )
18 {
19 float diameter = 2 * (float) message;
20 MAX_RADIUS = (float) message;
21 llOwnerSay("Radius is set to " + (string) MAX_RADIUS + ", Diameter is set to " + (string) diameter);
22 }
23
24 }
25 // END //