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_sequence__sensor  

sound_sequence__sensor

sound sequence sensor.lsl

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

the Zip file

Download all files for sound_sequence__sensor
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. sound_sequence__sensor_1.lsl
1
2 integer FLAG = FALSE;
3 integer FLAG2 = FALSE;
4
5 integer counter = 0;
6
7
8 default
9 {
11 {
12 llSensorRepeat("", NULL_KEY, AGENT, 10.0, PI/2, 2 );
13
14 }
15 sensor(integer num)
16 {
17
18 if(FLAG2 == TRUE)
19 {
20 vector pos = llDetectedPos(0); // point at avatar
21 llSay(-908765, (string) pos);
22
23 }
24 if(FLAG== FALSE)
25 {
26
27 key thisKey = llDetectedKey(0);
28
29
30 llSay(0,"Welcome " + llKey2Name(thisKey)) ;
31
32 vector pos = llDetectedPos(0);
33 llSay(-908765, (string) pos);
34
35
37
38 if(counter > sounds)
39 counter = 0;
40 string soundname = llGetInventoryName( INVENTORY_SOUND, counter );
41 counter++;
42 llSay(0,soundname);
43 if( soundname != "" )
44 {
45 llPlaySound( soundname, 1.0 );
46 }
47
48 FLAG2 = TRUE;
49 }
50 FLAG++;
51
52 }
53
54
55
56 no_sensor()
57 {
58 FLAG = FALSE;
59
60 if(FLAG2 == TRUE)
61 llSay(0,"Goodbye!");
62
63 FLAG2 = FALSE;
64 }
65
66 }
67 // END //

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