Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script to play a song

Dion Lunasea
Registered User
Join date: 2 Oct 2008
Posts: 1
02-28-2009 23:43
Hi Folks,

I have problem to set up a music lounge and have one of my object plays a song when someone stand close within a certain range. The song is ready and it has been cut into set of .wav files (9 secs each). Anyone have suggestion how to make script that can play this files sequentially (I named them with "1", "2", .... "37" and put all of them in sounds directory) and people who can listen it should stand within 5 meter range or closer?
Thank you.


Dion,
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-01-2009 05:10
this should help, pay special attention to llPreloadSound
link:
_____________________
|
| . "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...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-01-2009 09:07
Good luck though. Even llPreloadSound() is far from a guarantee. I've had such crappy results with even the most carefully timed, pre-loaded sounds that I gave up a year and a half ago on a contracted music player. Wasn't willing to deliver a product that was of such horrible quality because of SL's horrible caching or download prioritization or whatever that it would MAYBE play half of the single 6-segment song I tested over and over and over again. Certainly never played the song the whole way through the first time for any viewer. Ever.. :mad:

But hey, maybe things have improved since then. :-/