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
Environment Environmental_Effects  

Environmental_Effects

Environmental Effects.lsl

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

the Zip file

Download all files for Environmental_Effects
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Environmental_Effects_1.lsl
1
2 1
3 list daySounds = ["",""];
4 list nightSounds = ["",""];
5
6 list nightAmbient = ["Cricket"];
7
8 default {
11 llSetTimerEvent(2.0);
12 }
13
14 timer() {
16 list myList;
17 float density = 0.9;
18
19 if(time.z > 0.0) {
20 myList = llListRandomize(daySounds, 1);
21 }
22 else {
23 myList = llListRandomize(nightSounds, 1);
24 density = 0.98;
25
26 // Ambient nighttime sound
27 if(llFrand(1.0) > 0.85) {
29 } else {
30 llLoopSound(llList2String(nightAmbient, 0), 1.0);
31 }
32 }
33
34 if(llFrand(1.0) > density) {
35 llTriggerSound(llList2String(myList, 0), 1.0);
36 }
37 }
38 }
39 // END //

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