Sound Scripting

Sound Touch

Adding sound is just as simple as adding a texture in second life, there are many default sounds that are available for use. To get the sounds to work they have to be put onto a prim, similar to how we did the particle script. The script basically tell second life how and when to play the sound. The sound has to be in a .wav formate or it can not be uploaded to second life, to upload a sound just go to the build-upload and then Sound. The scrip above is telling second life if the avatar touches the objects then it is to play the sound.

Sound Loop

This script Tells second life to play the sound in a loop, this is useful for repetitive sounds like water or wind.

Sound Collision

The sound script is very useful as if you create a phantom object so you are able to walk through it, this script tell second life to play sound on the collision start so when entering the object and also collision end so when leaving the objects. This could be used to key sounds at certain points.

Sound Random

This particular script plays the sound on a timer, also the timer can be set to random, when creating the sound it is important to drop the sound file on the contents part of a prim.

Now sound in second life works in the same way in which a texture does, not that it is an image by just a a texture needs to be seem less so it can be repeated and save load time so does a sound. In our build we have a waterfall and to put sound on that a 15 second sound clip of water would be rather large or the computer to stream every time you went near it. so to solve this problem I got the big sound file and edited out the part I needed an played it in a loop so it was not noticeable. Now as we already now know the sound file have to be put onto a prime, but we don’t want to be able to see the prim so if we use the transparent the prim becomes invisible, this means we can move were we want the noise to come from very easily. I saved out this file as a .wav file in 16bit for it to be uploaded to second life.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: