Join us in Phaze Demesnes

LSL Script Library Home   Add a script Show All
Category: Contributor: Description
Candles Anonymous Candle Script.lsl
Candle Script - type 'blow' and it will turn off, touch to start 
Candle Script.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:Candles
2 // DESCRIPTION:Candle Script - type 'blow' and it will turn off, touch to start
3 // you need two textures, one of a lit candle, and one without.
4 default
5 {
7 {
8 llSetStatus(STATUS_PHANTOM, TRUE);
9 llSetTexture("lit_texture", ALL_SIDES);
10 llListen(0,"","","blow");
11 llListen(0,"","","light");
12 }
13
15 {
16 llSetTexture("lit_texture",ALL_SIDES);
17 }
18
19 listen(integer number, string name, key id, string message)
20 {
21 if(message=="blow")
22 {
23 llSetTexture("unlit_texture",ALL_SIDES);
24 }
25 else if(message=="light")
26 {
27 llSetTexture("lit_texture",ALL_SIDES);
28 }
29 }
30 }
31
32
33 // END //