|
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
|
12-22-2006 04:56
Hi, you'll probably laugh, but I get a syntax error in hte llPlaySound line and can't figure out why. (I've tried with and without a set of brackets between llSoundQueuing and llPlaySound). Any hint much appreciated. -- Dylan default { state_entry() { llSay(0, "Touch me to play!"  ; } touch_start(integer total_number) { llSetSoundQueueing(TRUE) llPlaySound("jt01",1); } }
|
|
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
|
12-22-2006 05:14
Okay sorry found it. Now the script compiles okay, but it still doesn't work properly. The playing stops after the second sound. Any ideas? (The sounds are all there, I checked.) The complete script now looks like this: default { state_entry() { llSay(0, "Touch me to play!"  ; } touch_start(integer total_number) { llSetSoundQueueing(TRUE); llPlaySound("jt01",5); llPlaySound("jt02",5); llPlaySound("jt03",5); llPlaySound("jt04",5); llPlaySound("jt05",5); llPlaySound("jt06",5); llPlaySound("jt07",5); llPlaySound("jt08",5); llPlaySound("jt09",5); llPlaySound("jt10",5); llPlaySound("jt11",5); llPlaySound("jt12",5); llPlaySound("jt13",5); llPlaySound("jt14",5); llPlaySound("jt15",5); llPlaySound("jt16",5); llPlaySound("jt17",5); } }
|
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
12-22-2006 05:34
Back when I was using LSL frequently, llSetSoundQueueing() did absolutely nothing. Combine that with the behavior of llPlaySound() which is more of a "if you please, server, send my client a sound asyncrhonously and play it when you get it, if you get it" and you'll get the behavior you are seeing. I'd point you at the LSLwiki but it seems to be down of late. There is sample code there that shows you looping with llSleep()s. You might want to look in Yadni's Junkyard - in game - for free, open source, music players.
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
12-22-2006 10:10
you might want to try llPreloadSound. also, you may want to experiment with puting a llSleep() set to .2s shorter than the length of the sound file between each llPlaySound call.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|