I am having an issues, I have a particular sound effect that plays once a person accesses the title screen and main menu, however when the player goes into a different menu I would like for that effect to turn off and then a new track plays in the new screen. In my case, the password screen. I can’t seem to figure out this behavior in the blueprint editor to get the title screen/main menu to turn off when a player goes into a different screen and then resume once the player goes back into the title/main menu screens.
EDIT: If you can’t use your tracks with this system: attach your tracks to an actor as Audio Component variables, drag this actor to your level and use a Cast To Actor from your UMG…now you have your Audio Component variables in your UMG.
P.S. Remember to uncheck the “Auto Activate” option.
This is the Main Menu BP [UMG] where I store “Track 1” to an Audio Component variable and play it; when I destruct the UMG, I GET the variable and stop it. You can use this method wherever you use that Game Mode.
I think the best way is to create a cue then add your sound in a specific Sound Class, then set volume to 0 of that sound class .
UMG Sound Class, In Game Background Sound Class, and what else do you want .
And If you want a slider :
Drag a slider :
At Value add a function :
Then in Function :
Then : in Event Graph of you Widget :
I know this is an old post but this is the way i did it.
Right click, Create Sound 2D (Select the sound you want) then Promote it to a variable, I named mine BGM, then drag from the Return Value of your BGM and type Play.