How do i make enemy AI have footstep sound?

So I’m making a horror game and I have my enemy NPC’s moving about patrolling the map and when they see the player they will start to chase, I want it so that they have footstep sound and the closer the player is to the enemy the louder the sound gets and the further away the player is the sound is quiet, any help would be great!
Thanks in advance!

Simply by going to the animation of your AI’s walking, navigating to the notify section and when in your animation the character hits his foot on the floor, add a notify (sound one) select the sound to play and done. Watch this. For sound getting louder and louder as they head close. Modify attenuation settings of your sound as per your need.

Thanks mate I will give it a go when I get back home, I did try using the notify on footstep but the sound was just playing for all of my npc’s so I could here all of them walking even if there no where near me will this tutorial be able to help me get around that, i’m at work at the moment so I can’t test it.

In order for the sound to not be heard everywhere, you need to make sure you turn on attenuation & spatialization for your sound, then you will hear the sound coming from the enemy’s location. Radius is the distance from the source where the sound will begin to fade out, and Falloff Distance is the distance from that point that it fades out to zero. Play with these numbers until you get what sounds natural.

114519-attenuation.png

2 Likes

Thanks man I will give it ago when I get back home! Cheers mate