Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

layered sounds

Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-14-2007 00:59
ok, ran into some weirdness with playing sounds...

I want to trigger a set of sounds, user intechangeable, but ran into a problem...

if I want to trigger the same sound again, before the first one has stopped, it doesn't let me...

//-- test case example
//--sound = 3sec long
llPlaySound( sound );
llSleep( 4.0 );
llPlaySound( sound );

works fine, but if the sound is 5 seconds long, (and could be if the user defines a new one) that same function ignores the second attempt to play (apparently because it has the same key, and won't play the same key sound over top off itself)

looking for creative workarounds, I'd rather not limit what the user can play, or rather the length of sound a user can choose... ideas?
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
11-14-2007 02:13
You can layer sounds by using multiple prims. If you have the same sound in multiple prims (or just the key even), you can overlay sounds. I've never experimented with using multiple scripts in the same prim either, but that may be another way to do it.
Zena Juran
Registered User
Join date: 21 Jul 2007
Posts: 473
11-14-2007 04:01
I like to use llSetSoundQueueing and I also use llTriggerSound instead of llPlaySound. The multi-prim advice works great but I like to keep the amount of scripts used as low as possible (ALAP... lol). It can be all done on one script!
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-14-2007 21:13
heh I forgot to mention, that WAS with sound queuing set to true... works for different sounds, but not the same... but you say trigger sound works with the same sound? that'd be lovely =)

I'd rather avoid trying to trigger the sound from multiple prims as there are timing and counter issues that'd make it a pain to code, never mind this is a 10 prim project... (and may or may not be neccessary, depending on users sound length, which I have no way to programatically check =/)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -