Difference between revisions of "PhysicalSounds"

(New page: Note: This tutorial has been made in preparation for an upcoming release of PyPrp, it will only work with the newest (unreleased version). This is currently unsupported (we won't help you ...)
 
Line 15: Line 15:
 
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:
 
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:
  
  <Object name>:
+
  <Emitter-Object name>:
 
     type: randomsound
 
     type: randomsound
 
     randomsound:
 
     randomsound:
Line 36: Line 36:
 
Here are the props for your physical object (say a beach-ball):
 
Here are the props for your physical object (say a beach-ball):
  
  <object name>:
+
  <Kickable-Object name>:
 
     physical:
 
     physical:
 
         impact: <your random sound emitter name>
 
         impact: <your random sound emitter name>

Revision as of 19:10, 2 July 2008

Note: This tutorial has been made in preparation for an upcoming release of PyPrp, it will only work with the newest (unreleased version). This is currently unsupported (we won't help you with something if you get stuck).


Physical Sounds

About

Physical Sounds are used when you want to have a kickable make Impact and Sliding sounds when you hit or punch 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:
        impact: <your random sound emitter name>
        slide: <your random sound emitter name>

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 you first select the emitter, then you select the kickable and press CTL+P then press ok.

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