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 Sound_Prim_Script__On_Attach  

Sound_Prim_Script__On_Attach

Sound Prim Script - On Attach.lsl

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

the Zip file

Download all files for Sound_Prim_Script__On_Attach
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Sound_Prim_Script__On_Attach_1.lsl
1
2
3 // Sound Prim Script - On Attach
4 //
5 // Randomly picks a sound in inventory,
6 // plays it whenever the prim is attached
7 // to an avatar.
8 //
9 // If the attachment is a HUD, only the
10 // wearer will hear it.
11 //
12 // Set this between 0.0 and 1.0
13 float LOUDNESS = 0.5;
14 //
15 ////////////////////////////////////////////////
16 default
17 {
18
19 attach(key attached)
20 {
21 if(attached == NULL_KEY) return; // comment this out if you want noise when detached.
22 //if(attached != NULL_KEY) return; // comment this out if you want noise when attached.
23
25
26 if( sounds <= 0 ) return;
27
29 if( soundname != "" )
30 {
31 llPlaySound( soundname, LOUDNESS );
32 }
33
34 }
35
36 }
37
38
39
40 // END //

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