-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadvanced-speaker_right.lsl
55 lines (52 loc) · 1.52 KB
/
advanced-speaker_right.lsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
integer prechannelRight = 35687;
integer playchannelRight = 35689;
integer volumechannelRight = 35679;
integer prechannelMono = 45687;
integer playchannelMono = 45689;
integer volumechannelMono = 45679;
integer VOLUME;
integer listenHandel;
integer listenHandel2;
integer listenHandel3;
integer listenHandel4;
integer listenHandel5;
integer listenHandel6;
default
{
state_entry()
{
VOLUME=1;
listenHandel = llListen(prechannelRight,"",NULL_KEY,"");
listenHandel2 = llListen(playchannelRight,"",NULL_KEY,"");
listenHandel3 = llListen(volumechannelRight,"",NULL_KEY,"");
listenHandel4 = llListen(prechannelMono,"",NULL_KEY,"");
listenHandel5 = llListen(playchannelMono,"",NULL_KEY,"");
listenHandel6 = llListen(volumechannelMono,"",NULL_KEY,"");
}
state_exit()
{
llListenRemove(listenHandel);
llListenRemove(listenHandel2);
llListenRemove(listenHandel3);
llListenRemove(listenHandel4);
llListenRemove(listenHandel5);
llListenRemove(listenHandel6);
}
listen(integer channel, string name, key id, string message)
{
if(channel == playchannelRight | channel == playchannelMono)
{
llStopSound();
llPlaySound(message,VOLUME);
}
else if(channel == prechannelRight | channel == prechannelMono)
{
llPreloadSound(message);
}
else
{
VOLUME=(integer)message;
llAdjustSoundVolume(VOLUME);
}
}
}