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 ...)
 
(Use)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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==
 
==About==
  
Physical Sounds are used when you want to have a kickable make Impact and Sliding sounds when you hit or punch the object.
+
Physical Sounds are used when you want to have a kickable make Impact and Sliding sounds when you hit or slide the object.
  
  
Line 15: Line 8:
 
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 29:
 
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>
+
        sndgroup: (metal|grass|wood|stone|<int>(advanced users only))
         slide: <your random sound emitter name>
+
         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 you first select the emitter, then you select the kickable and press CTL+P then press ok.
+
NOTE: Do not include the parens "()" in your script for the sndgroup line.
 +
 
 +
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? ;)
 
That's everything.  Not that much to this is there? ;)

Latest revision as of 17:04, 3 August 2008

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)>

NOTE: Do not include the parens "()" in your script for the sndgroup line.

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? ;)