Level music is being restarted when sfx play
I have music for each of my levels, and I just want it to play until either it finishes or I tell it to stop. But it keeps getting retriggered when other sounds (specifically effects, like bullet sounds) get played.
It only happens when there are a lot of sounds playing at the same time. My sound effects are set to "stop oldest", and my level music is set to "prevent new". Both are set to "max concurrent: 16", though it shouldn't make a difference for my level music because I only ever play it once.
I have tried adding the level music with "play sound 2D" and also using an ambient sound actor which is activated in the blueprint. Neither method solves the problem. My sound effects are played using "play sound 2D".
The way the issue manifests is that I'm, for example, half way through the level and I'm firing my weapons and collecting items, so there are a lot of sounds being triggered at once, and the level music suddenly starts at the beginning again.
What's causing this problem? Am I simply trying to play to many sounds at once? As a rough estimate, there might be about 70 sounds being played at the same time. How can a completely separate sound being played cause my music to restart?
asked Aug 09 '15 at 10:42 AM in Blueprint Scripting
In case anyone else is still wondering what to do: You can set a priority for soundcues. You can do it in the soundcue itself and you can "Set Global Listener Focus" in a blueprint, which prioritizes sound effects in listener focus. https://docs.unrealengine.com/latest/INT/BlueprintAPI/Audio/SetGlobalListenerFocusParameters/index.html
Then simply adjust the concurrency setting to "stop lowest priority". If you made the music the highest priority, it shouldn't stop.
Follow this question
Once you sign in you will be able to subscribe for any updates here