I have been trying out the Footstep Sound script included with Master Audio. I can get it to play a sound when I 'walk' over an area on its defined layer.
I am using Attach to Caller and On Trigger Enter 2d.
My question at this stage is, what now? I feel like I am not utilizing the Footstep Sound script properly. There must be some deeper functionality to it that allows me to start or stop the footsteps when the player is not moving yes?
Post by DarkTonic Dev on Feb 13, 2021 18:07:19 GMT
To trigger footstep sounds. Normally it's just the impact sound and can't be interrupted if your foot stops moving. If you step hard in a puddle, it would be the splash sound. Even if you stop moving, the splash wouldn't be interrupted right? Some goes for stepping on the rock floor in a cavern.
To work best, people make a tiny game object on the foot with a very tiny collider to fine tune and put the Footstep Sounds on that component.
My use case is much simpler as I am in top down 2D. How can I tell the Footstep Sound script to play or stop when I am not moving my character? I know how to account for this on my player script but how do I target the Footstep Sound script? I only see that it can utilize a trigger (or collider) to play a sound. I should set the sound to repeat as well yes?
You don't "target" the Footstep Sounds script as it is dumb and just does what it does. If it's not a help, you can simple not use it and use the API. Or you can use it for the triggering, and code the disabling as above.