PyPRP:Adding Footstep Sounds

Revision as of 05:57, 21 January 2008 by Marcello (Talk | contribs) (Step 2: adding AlcScript)

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 simple. You only need to steps:


1. add a region

2. add AlcScript for that specific region


Have a look at my age. You will notice I added to regions (marked pink). The one on the left is called RgnFootStepGrass, the other one RgnFootStepDirt.


FootSteps rgns.jpg


Step 1: Adding regions

So how did I add these regions. Actually this is pretty simple 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.


FootSteps addRgn.jpg


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


FootSteps layers.jpg


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.

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 there isn't more code yet. Have a look at the code I entered.


FootSteps alc.jpg


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. grass and dirt


Available footstep sounds

List of Footstep Sounds The following sounds are available for you to use in the "surface" property.

dirt puddle water tile metal woodbridge ropeladder grass brush hardwood rug stone mud metalladder woodladder deepwater maintainerglass maintainerstone swimming