Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HELP! llplaysound only seems to play the first two sounds

Rafe Gardner
Registered User
Join date: 8 Oct 2003
Posts: 3
02-08-2006 08:25
Hiya,

(Forgive me for not including the script below but I'm at work without access to my SL inventory)...

I'm trying to make a Valentines Day gift for my gf; I'm new to scripting and so basically I've set up an object that detects when the object is touched, and then SAYS a text message on screen (HAPPY VALENTINES DAY) and then plays through a series of 7 sound files that I've put inside the object (in this case, a book), one after the other. I'm also using the SoundQueue command to ensure that sounds wait until the previous one has finished.

What's happening is that everything (detect touch, SAY text) works apart from the fact that the collection of llplaysound ("sound1", 1) commands don't seem to all work....it gets to the second sound, plays it, and then stops. No third or subsequent sounds are played.

All the sounds work individually, and if I move the order that they are played around, still it's only the first 2 that are played, regardless of what they are.

In the absence of being able to see my script, has anyone else had a similar problem?

Many thanks.
Masakazu Kojima
ケロ
Join date: 23 Apr 2004
Posts: 232
02-08-2006 08:37
The sound queue is only one level deep, so you will need to use llSleep() or a timer to make sure one sound finishes before you queue another. As an example you can see Psyke's music script in the Scripting Library, and I will drop you a copy of mine if you IM me in world.
Rafe Gardner
Registered User
Join date: 8 Oct 2003
Posts: 3
02-08-2006 08:48
Thank you very much! I will drop you an IM if I can't get it to work :)

Many thanks for your time!