I don’t know if this is the cause for you, but it’s worth at least looking into:
If you destroy the actor, then the sound component will be destroyed with it.
It’s probably better to configure a sound effect (not a full component,) and then spawn the sound with “play sound at location,” if you want to immediately destroy the actor.
Another option is to play the sound, but not immediately destroy the actor, but instead set its lifetime to something like 2 seconds.
If the cause is not “the actor gets immediately garbage collected, which destroys the component,” then this solution obviously won’t work
I was initially starting my level with 38 BP_Enemy actors. If I only start with 10, then each actor correctly triggers the sound. So it seems like there are problems when loading too many actors at once, or maybe there is some kind of limit to the number of wave players at a time.
Either way, reducing the number of enemies isn’t a real solution. If I want to have dozens of enemies on screen, what is the limit? where is MetaSounds running into an issue?
Use the console debug command. Hit Shift F1, press ~, enter au.3dVisualize.Enabled 1 and it will show the active sounds. Reenable the number of AIs you had and see how many you actually have active. There are other commands that might be helpful debugging at:
That’s the 4.27 page but the commands worked for me on 5.0.0 too. I haven’t tried it on my metasounds stuff but it sure showed the overages I was getting that was causing sound dropouts on the ones using sound cues. There is a limit to the number of wavs that can be playing, but I couldn’t find what it was.