Would you be willing to share some of how you did that? Iām actually trying to do the same thing myself, because I donāt want to have to add an actor/scene component to a level to be able to properly control my audio the way I want to, and Iām having trouble figuring this stuff out on my own.
Iām a programmer first and artist a distant second, and have 0 music or audio skills to save my life. lol
My game has BG music that needs to have an intro, a looping chorus, and an outro (where the middle part of the audio is looping until some goal is accomplished, for instance defeating the level boss, at which point I turn off looping). Iāve got a sound cue set up for this purpose, and I figured out thereās a node for setting looping settings (number of times to loop, or looping enabled or disabled). And Iāve got some code set up (currently in an actor because I couldnāt figure out how to add an audio component to a level bp) which allows me to sequence through the cue from 0-3 (0 is gonna be no audio, effectively disabled, and when I start my level, Iāll begin the process of incrementing it, up to 1 for the intro, 2 for the looping chorus, and 3 for the outro. 1 and 3 are not looping by default, but 2 is looping by default, as I intend to turn off looping on 2 when an event/function is called. when 1 ends, I call the increment function, when 2 ends after looping is disabled, again increments it to 3).
My trouble currently is I donāt know how best I should set up the audio component in the level (levels arenāt set up to follow parent/child relationships, but I made a ālevel parentā that I duplicate for each level I make, and simply change the wave files for each level, but the logic should function identically), and would ideally LIKE to attach it directly to the level like you said, not add it as an actor. In addition to that, I am not sure how to make index 2ās looping audio no longer loop upon a set event happening. Iāve got a node for that in the Cue but donāt know how to basically make that happen on call.
Edit: Wait, I see now you were saying NOT to add it to the level as a component. Makes sense then why itās not an option in UE5. Given that it seems impossible to do without having an actual actor spawned somewhere in the level (which means I have to remember to do that every time I make a new level), it might be best if I just add one to my level parent and then when I duplicate that, rather than delete everything in the viewport and start fresh, I just adjust things to change how each level looks so that I leave the spawned actors where they are.
Aside from that, do you know how I would be able to trigger the change of looping like I said above?