My blueprint to play footstep sounds when the player is moving does not stop when the player stops moving - help please.


It just doesn’t stop the sounds. In fact, it lets me play the footstep sound more than once at the same time which is really irritating however, I assume this issue will pass when I resolve the main issue which is stopping the sound when the player stops moving.

your spawning a sound, try PlaySoundAtLocation

usually what’d youd use is an AnimNotify that matches to the footsteps.

ahh okay i will try that thank you very much for the response!

im in a first person blueprint so im not too bothered about that.

ive done it and unfortunately the same problem is still happening?

it might be your timeline,
try settimerybyevent, looping, say 0.3s so it plays the sound every 0.3s

then on completed clearandinvaliadtetimer

Why do you have a timeline? I can’t figure out what you’re trying to do. There’s absolutely nothing in your blueprint to stop the sound from playing. You stop the timeline, but once the audio has started, stopping the timeline isn’t going to do anything. It’s already playing. If you have a timeline to fade in/out, that’s better done in a sound cue.

I don’t know how you’re syncing up the footstep sounds with the actual footsteps, but to start, let’s just assume you have a looping sound and you just want to start and stop it.

Get rid of the timeline. You don’t need it.

Add an AudioComponent to your actor. Set the sound effect or sound cue on it.

Now take your PlayStepSFX event and just use the Play node on the AudioComponent. To stop it, just have StopStepSFX use the Stop node on the AudioComponent.

That’s it. It’s literally that simple.

If you want to get more accurate, you can check the “Play Multiple Instances” checkbox and have a sound effect for ONE footstep. Now you only trigger the sound when a foot reaches the ground. You never need to stop the sound because there’s no need. And it will play “faster”, but still sound fine as you speed up (and play slower when you slow down), but the pitch will remain the same.

How to detect when the foot has reached the ground? You can do line traces from a socket in the foot every so many ticks (or add it to a timer). Then you have a variable that alternates between each foot. This will avoid playing the sound multiple times for the same foot.

OR you can look at your walk/run animation and add events to your animations. While this is potentially simpler, it is not as robust since you would need to update every single animation where the feet move. But if you only want it while walking/running, this is a viable option.

OR you can attach an invisible component/actor to a socket with a collision and just use its collision overlap with the ground to trigger the footstep sounds.

yeah i didnt understand what the timeline did either. i was following another forum from this page and just copied the steps and didnt question much. i assumed the timeline controlled the speed at which the sound played. your solution worked anyways, thanks a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.