Playing sound once instead of having it loop, UMG menu

I am trying to add sound into my UMG button menu for gamepad controller. My goal is to play a sound once, when a button comes into focus (much like OnHovered for the mouse). However, the sound keeps looping as long as the button is in focus. How can I get it to only play once?

There are on “hovered” events on buttons, you could play the sound from that event.

There is a second possibility, but I cant check this since Im at work, but using “spawn sound” allows you to set further options in a audio component, that could possibly be where the looping is happening. Try using the “play” node instead, it will play the audio once, then destroy the loaded sound.

// hope that helped.

Has the sound been set to loop? Or is a tick event causing it to play every frame?

Double click on the sound in the content browser (you must not click on the “play sound” button) to open up some options for it, and check if it’s set to loop. If it isn’t, then the problem might be the tick event. I would try calling a “do once” node just before playing the sound.

On the “do once” node there is a “reset” slot, which you will need to connect somehow in order to allow the sound to play again later.

Best of luck to you!

I have not heard from you in a while. How’s everything going?