Download

UAudiocomponent doesnt stop sound

now this is acting weird cuz its supposed to play a sound when moving forward and stop playing when not moving but instead it play the sound everyframe and makes a horrible noise;

the code

Don’t spawn the sound. Since it’s a recurring sound, better to use an audio component and make it play/stop when need it.

well Play() is weird, its taking a float as a parameter instead of USound or something how I’m supposed to choose which sound to play from blueprint?

Use **SetSound **using your *SoundBase *variable as parameter:

Then use **Play **( float parameter is start time ):