>>21370 here, allow me to elaborate.
I'm assuming you want something akin to The Legend of Zelda: The Wind Waker, where the battle music had trumpets/strings cutting in whenever the player landed a hit. There's also Metal Gear Rising: Revengeance, where boss battle music had two mixes (vocals and non-vocals), and the song cuts to the vocal version when the boss's weak point is exposed.
Basically, here's what the process looks like, from the POV of the music-playing code, so to speak.
>Wait for Enemy to send an event saying they got hit
>Determine if it's the player that hit them
>Play a sound effect
The enemy needs to send the Music Engine an "event" telling the Music Engine that someone got hit, who did the hitting, and (for the special fancy riff that plays during Parry Attacks in WW), what kind of hit it was.
Good news, UE4 already has this implemented. In fact, almost every modern game engine has one of these "event-handling" systems, and they are quite flexible. The trick is learning to use them.
If you're making your own engine, that's a bit more tricky, and beyond my expertise.