What's the best way to implement dynamic background music?

There is no ‘best way’, but one way that would make a lot of sense would be to have a ‘music controller’.

It could be just an actor in the level, or in the game instance, and can receive messages about what kind of music to play.

To achieve what you have with ambient sounds, you can replace them with blueprint collision volumes which, when overlapped by the player, send a music request to the controller.

Also, when an enemy decides to attack, it can also request a music change.

Like that.

By “dynamic”, I mean background music that can change if the player enters/exits a certain area or changes based on the situation, like if he is spotted by an enemy the music may change to ‘battle’ music, stuff like that.

Currently I have an Ambient Sound Actor placed in the level and it auto-plays when the level starts, but I really don’t know if this is the “appropriate” way to add background music and would really appreciate some tips.