Hey so I have a death system that when the player hits something he dies and it plays a sound. After he dies you get redirected to the menu level. The thing is though it keeps playing a sound over and over again and it’s keeping me from pressing the buttons. Any help would be appreciated!
Can you provide screenshots of your blueprints so I can recreate this part of your setup locally and help answer your question?
By the way skip the Execute console command I was just trying to test something
On the Play Sound At Location node, can you click the magnifying glass to open the Explosion_Cue class? In that class there should be a Wave Player node, if you select the Wave Player node there should be a Looping checkbox, is the Looping checkbox checked?
When I click the magnifying glass it just shows me where its located.
Yeup, click on each of the Wave Player nodes (to the left) and check to see if the Looping property is enabled on one or both of the Wave Player. If it is you might have to disable Looping and see if that solves your issue.
Ok elite so The sounds aren’t looped but I figured something out. After I double click on the menu the sounds stop playing and I can interact with the buttons but if I don’t double click then they keep playing and I can’t touch the buttons. Is there a way to focus it?
Try this, instead of calling PlaySoundAtLocation call SpawnSoundAtLocation and take the Audio/Sound reference that SpawnSoundAtLocatino returns and call DestroyComponent or SetActive after OpenLevel.
Wait I do it after it opens the level? Also which one cause there are a bunch for destroy and setactive
OK I think I figured the problem. Just not how to fix it. What it is doing is the game mode blueprint is set to just spawn the things on any level. Do you know how to get it to spawn on a certain level? It’s not really the sounds fault anymore it’s the game mode causing all of this.
yeah and It did not spawn all my object blueprints. I think it is because all the spawning functions are on the gamemode. If I try moving the functions then it does not recognize the variables. Can I specify the level the game mode runs on somehow?
Have you tried editing the level’s blueprint and adding this play sound code to the event graph?