|
Wanda Rich
Registered User
Join date: 22 Apr 2006
Posts: 320
|
08-18-2006 13:44
Hi I've done a couple of searchs but not come up with too much info on this subject.
I'm at a stage in my project where I am beginning to add sounds to my build. At the moment I have a small script that I shove in a prim, along with a sound and it loops forever - or until i click the prim. This is nice for very subtle effects but I am finding the 10 second max audio length makes a lot of sounds annoying very quickly.
I'd like to know if there is some way with scripting to "layer" audio clips and effects to play in an order I'd like. eg; sound a, sound b, sound c, sound a, sound d, sound a, etc, etc
Another way of looking at it could be to smash a 60 second clip into 6 parts and play them in order to form the one clip inside sl. That isnt what i want to do particularly as i would imagine lag etc would mess it up a little.
Also I'd really like to know how i could go about playing a sound when an avatar stands on a specific prim for example.
Are there any ways to achive these things with little knowlege of scripting?
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-18-2006 13:59
Everything you're asking about can be done, although I'm sorry to say I don't have the scripting skills to tell you precisely how. I know it's possible though, because there used to be tons of objects all over the place that do exactly what you're talking about.
For example, back before we had streaming audio, the standard way to play songs was to slice them into 9-second clips, shove them all into a prim, and script the prim to play the clips in order. With a well-written script, the effect was totally seamless. The best such "radios" used to sell for a pretty penny.
I used to have a "band in a box" type of thing someone made for me (probably still in my inventory, buried under my other 15,000 items, but I don't remember its name so I'll never find it) that was pretty interesting. It consisted of a bunch of instrument modules (guitar, bass, drums, etc) that looked like stomp boxes with a bunch of foot pedals on them. The user would touch a pedal to play a pre-recorded riff, which could either loop or just play once. You could "jam" by setting the drums, bass, and rhythm gutar to loop, and then you could whale on the lead guitar by clicking the buttons in various orders (kinda like those electronic toy guitars they sell at Kaybee where touching a fret plays a riff). It was fun for a day or two.
As for playing a sound when an avatar stands on a prim, that's really simple. The doors on my starships play that swoosh sound when you walk into them (and they open at the same time). It's just a simple collision trigger. I'd give you the script, but I'd need to ask the person who wrote it for me if they'd mind first. I'm sure if you ask on the scripting forum, you'll get a ton of responses. It's like a 3-line script. I'm sure any competant scripter could write it in less than a minute.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Wanda Rich
Registered User
Join date: 22 Apr 2006
Posts: 320
|
08-18-2006 15:24
thanks for the reply, i will ask about the script in the scripting forum 
|