Join us in Phaze Demesnes or follow us:

Home   Show All
Category: Contributor: Creator
Candles Candle_Script  

Candle_Script

Candle Script.lsl

Category: Candles
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life + OpenSim

the Zip file

Download all files for Candle_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Candle_Script_1.lsl
1 // you need two textures, one of a lit candle, and one without.
2 default
3 {
5 {
6 llSetStatus(STATUS_PHANTOM, TRUE);
7 llSetTexture("lit_texture", ALL_SIDES);
8 llListen(0,"","","blow");
9 llListen(0,"","","light");
10 }
11
13 {
14 llSetTexture("lit_texture",ALL_SIDES);
15 }
16
17 listen(integer number, string name, key id, string message)
18 {
19 if(message=="blow")
20 {
21 llSetTexture("unlit_texture",ALL_SIDES);
22 }
23 else if(message=="light")
24 {
25 llSetTexture("lit_texture",ALL_SIDES);
26 }
27 }
28 }
29
30
31 // END //