Can this blueprint code be improved?

Sorry for stupid title, couldn’t think of succinct way to describe this.

Just curious if anybody has some different way to do something like this:

The use case is that I have a few different music tracks that can be layered so each needs its own “channel”.
ECH1 = environment music channel
BCH = battle music channel

If a higher channel is toggled on, the ones beneath it should too. For instance, if ECH4 = true, then ECH1, 2, and 3 should also be.

I had a little more modular system because, theoretically, only one music track can ever play at a time, however in practice with fading in and out and managing a single reference for the “current music track” was too much trouble so I opted for something similar to what you find in a DAW.

u can just remove the loop, since the On condition already checking the layer

Another way, u can store the sound to an array, then use a loop to play sound based on the layer

1 Like