PhysicalSounds

Revision as of 20:32, 9 July 2008 by Lontahv (Talk | contribs) (Use)

About

Physical Sounds are used when you want to have a kickable make Impact and Sliding sounds when you hit or slide the object.


Use

Ok, you're going to want to start with an empty (your emitter), and then add a random-sound to the object. All we have to do is add the AlcScript#sound settings that we want for the multiple sounds to the "sounds" list. In most cases we'll want to use "static" sounds (you put the wav in the streaming cache for these). Here is an example of the random sound set up with two sounds--both static:

<Emitter-Object name>:
    type: randomsound
    randomsound:
        sounds:
          - SomeSound1:
                sound:
                    file: SomeSoundBlock1
                    volume: 1.0
                    buffer: static
          - SomeSound2:
                sound:
                    file: SomeSoundBlock2
                    volume: 1.0
                    buffer: static

As you can see, the stuff listed under "sounds" is exactly the same structure as with normal emitter settings.

Now that we have our random sound emitter we can start work on the actual physical sounds. :D

Here are the props for your physical object (say a beach-ball):

<Kickable-Object name>:
    physical:
        sndgroup: (metal|grass|wood|stone|<int>(advanced users only))
        impact: <your random sound emitter name (don't use this var if you don't want any)>
        slide: <your random sound emitter name (don't use this var if you don't want any)>

Now, since you most likely don't want your object to make sounds elsewhere while you play with it: you'll need to parent the emitter to the kickable object. To do this; first select the emitter, then select the kickable and press CTRL+P and press ok.

Now you need to add a sndgroup to the collider-ground:

<Ground-Object name>:
    physical:
        sndgroup: (metal|grass|wood|stone|<int>(advanced users only))

That's everything. Not that much to this is there? ;)