Adding Walking Sound Effects

     Below is a simple function that uses the self.Stepping variable to check whether or not the player is at the bottom of their step. If so, then it plays the walking noise. A more advanced version of this script might also check the player height, against the height of the level water and play a water sound if below that point.

{

    Init[()
    {
        walkfunction();
    }]

    walkfunction[()
    {
        if(self.Stepping)
        {
            PlaySound("stepnoise");
        }
    }]

}

Copyright © 2008 Bookshock Publications.