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
Sound Frog_sensor  

Frog_sensor

Frog sensor.lsl

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

the Zip file

Download all files for Frog_sensor
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Frog_sensor_1.lsl
1
2 // Frog player
3 // Written by Ferd Frederix
4 // Scans every 10 seconds for visitors within 5 meters.
5 // then it croaks
6
7 play ()
8 {
9 string sound = "frog";
10 float value = llFrand(4.0) ;
11 integer file = (integer) value + 1;
12 llPlaySound( sound + (string) file, 1.0);
13 }
14
15 default
16 {
18 {
19 // arc=PI is a sphere, you could look more narrowly in the direction object is facing with PI/2, PI/4 etc.
20 // don't repeat this too often to avoid lag.
21 llSensorRepeat("", "", AGENT, 5.0, PI, 10.0);
22 }
23
24 sensor(integer num_detected)
25 {
26 play();
27 }
28
29 touch(integer num_detected)
30 {
31 play();
32 }
33
34 }
35 // END //

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