I’m having issues with an audio component not stopping.
I have implemented 2 other sounds using Spawn Sound 2d, promoting it to a variable, then using that to toggle active when I want it to stop and works perfectly. However when I try this same process for the last sound it doesn’t listen to the toggle active blueprint and continues playing on a loop.
I’m not sure if I’m encountering a bug in this scenario since it’s almost exactly the same as the other ones (the difference being the sound file).
I’ve tried other posts advice about verifying, deleting save and intermediate files, and also deleting and reimporting the sound file, this hasn’t fixed the issue.
I’ve also tried putting in a is Valid to check and it’s saying its valid.
I think calling “FadeOut” with “Fade Volume Level” set to 0.0 will automatically stop the sound once the fade has ended. So it’s possible that you’re reactivating the sound with “ToggleActive”. If you really want to make sure the sound is stopped try using “Stop” instead.
Another thing to note is that the 1s for the fade and the 1s from the delay won’t always end at exactly the same time. This means sometimes the fade will end after ToggleActive is executed and sometimes before. I think this is why even with the same code, you’re getting different behaviours. Try increasing the delay (say 1.5s) to ensure the fade is done before the rest of the code is executed, it might help you debug the issue.
Da iawn butt, try stopping it just after spawning it to see if the problem comes from the code or if it is something else. Also is it a looping sound effect?
I’ve solved it!
My spawn sound was connected to a for each loop which spawned multiple sounds, and I could only stop one that was referenced.
Thanks for your help!