Difference between revisions of "PyPRP:Adding Footstep Sounds"
(→Step 2: adding AlcScript) |
|||
Line 2: | Line 2: | ||
− | Using the old plugin I always had troubles getting footsteps to work. Using AlcScript however I had it working in one go. It's really simple. You only need | + | Using the old plugin I always had troubles getting footsteps to work. Using AlcScript however I had it working in one go. It's really very simple. You only need two basic steps: |
Line 10: | Line 10: | ||
− | Have a look at my age. You will notice I added | + | Have a look at my age. You will notice that I added two regions (marked pink). The one on the left is called RgnFootStepGrass, the other one RgnFootStepDirt. |
Line 18: | Line 18: | ||
== Step 1: Adding regions == | == Step 1: Adding regions == | ||
− | So how did I add these regions. Actually this is pretty | + | So how did I add these regions. Actually this is pretty straight forward too. Change one of the Blender windows to Scripts and use the Script button to add a PyPRP script. One of the options is "Add Footstep Region". Sounds like that's the one we need :) |
Line 24: | Line 24: | ||
− | Regions are by default added to the second layer in Blender. To be able to scale them I activated both the first and second layer (hold shift while clicking on the layer buttons). | + | Regions are by default added to the second layer in Blender. To be able to scale them correctly I activated both the first and second layer (hold shift while clicking on the layer buttons), so I both my terrain and the regions would be visible. |
Line 30: | Line 30: | ||
− | Remember the old plugin had some sort of fade out at the regions edges? Well now the sounds are played all the way to the edge of the region. | + | Remember the old plugin had some sort of fade out at the regions edges? Well now the sounds are played all the way to the edge of the region. Pretty cool! |
+ | |||
== Step 2: Adding AlcScript == | == Step 2: Adding AlcScript == | ||
Line 37: | Line 38: | ||
− | For starters change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# insert AlcScript code here" comment at the top of the window. Chances are | + | For starters change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# insert AlcScript code here" comment at the top of the window. Chances are that's the only code there is right now. |
+ | |||
+ | |||
+ | Have a look at the code I entered. | ||
Line 49: | Line 53: | ||
2. '''surface''': type of sound. Here resp. dirt and grass | 2. '''surface''': type of sound. Here resp. dirt and grass | ||
+ | |||
== Available footstep sounds == | == Available footstep sounds == | ||
− | + | There are off course many more types of terrain you will want to add footstep sounds too. Below is a list of available footstep sounds to use with the "surface" property. | |
Revision as of 06:18, 21 January 2008
Remember that little (not yet DRC approved) age I wrote to demonstrate stenciling? Well it was awefully quiet there so I decided to add some footsteps to my blended terrain. Since I blended grass and stone/dirt those were the sounds I wanted. Not surprising really.
Using the old plugin I always had troubles getting footsteps to work. Using AlcScript however I had it working in one go. It's really very simple. You only need two basic steps:
1. add a region
2. add AlcScript for that specific region
Have a look at my age. You will notice that I added two regions (marked pink). The one on the left is called RgnFootStepGrass, the other one RgnFootStepDirt.
Contents
Step 1: Adding regions
So how did I add these regions. Actually this is pretty straight forward too. Change one of the Blender windows to Scripts and use the Script button to add a PyPRP script. One of the options is "Add Footstep Region". Sounds like that's the one we need :)
Regions are by default added to the second layer in Blender. To be able to scale them correctly I activated both the first and second layer (hold shift while clicking on the layer buttons), so I both my terrain and the regions would be visible.
Remember the old plugin had some sort of fade out at the regions edges? Well now the sounds are played all the way to the edge of the region. Pretty cool!
Step 2: Adding AlcScript
This was the first time I actually added AlcScript. And it couldn't have been easier.
For starters change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# insert AlcScript code here" comment at the top of the window. Chances are that's the only code there is right now.
Have a look at the code I entered.
I added code for both regions, using their object names. For simple footsteps only two properties have to be set:
1. type: in this case we are adding code to a footstep region
2. surface: type of sound. Here resp. dirt and grass
Available footstep sounds
There are off course many more types of terrain you will want to add footstep sounds too. Below is a list of available footstep sounds to use with the "surface" property.
- dirt
- puddle
- water
- tile
- metal
- woodbridge
- ropeladder
- grass
- brush
- hardwood
- rug
- stone
- mud
- metalladder
- woodladder
- deepwater
- maintainerglass
- maintainerstone
- swimming
Wrapping up
Well... that's it. There isn't much more to it. I'm not sure whether more tweaking is possible with AlcScript. I will have to figure that out for myself first or have some of the real PyPRP gurus have it explain to me. If there is more I will add it here.
Shorah!
Marcello