I don’t want the whole blueprint to be consumed, i just want pause menu music to play when I press escape which does not work as pausing the game stops everything
You can put the music in a blueprint which has the setting 'tick when paused.
Or you can make the sound ( music ) a UI sound
Hi DarkXSeries,
Good question, I did a google search for “unreal engine play music while paused” and found that you can enable ’ Is UISound’ on the sound component. But with that bool on the sound plays while in editor too! So you’ll want to disable ‘Auto Activate’ and activate the sound/music on begin play.
(Or spawning the sound and setting variables like in ClockworkOceans post is another option, A third option (No Audio Component required) would be to just call a ‘Play Sound 2D’ node. I just tested and it keeps playing when paused.)
Cheers
Try putting a Print String node on the top False output, I wonder if that branch is evaluating True or False since ‘Set Game Paused’ is happening a few frames after. (If it is firing false, putting a tiny delay after the Sequence node could be a viable workaround.)
Play it and make it UI BEFORE pausing
i put 4 tick delays and it still does not work
4 tick delays
“Is there anything smaller than a tick?” Love that question. Videogames are basically just a series of images, kind of like how life is a series of moments.
There are some idiosyncrasies in how blueprint evaluation/execution works. I did a quick test just to check my sanity. (General idea here is that the sequence node does not wait for everything on first pin to finish executing before starting execution of second pin)
MyBool is false by default, Executing this logic returns FALSE
Putting a delay. (in your case at least a 4 frame delay) after ‘Then 1’ the function returns TRUE
Then something is wrong with the sound excecution or script, because the sound works