How to get music event to be triggered by enemy AI

Hi Everyone,

I’m new to the implementation side of game audio and am trying to get the music to react to the enemy AI spotting the player (similar to how the music in Skyrim in the same scenario). As I have it now I have separate events for each piece of music. These events are referenced in a master music event (as nested events). This master music event is then being triggered in the level blueprint in UE4. The part I start getting confused about is getting the enemy AI to change the parameter I have set up to control the intensity of the music.

All forms of feedback, are appreciated as I have no idea where to even start looking for a solution.

If it helps I’m using FMOD 2.01.07 and UE 4.25.4

You’ll have to retrieve the event instance, which you can get with the return pin on most fmod nodes. You can promote it to a variable. From that instance, you’ll set the parameter value as you want, where you want.
The tricky part is more the UE4 part: how to communicate with the level blueprint, from the IA. There’s probably a lot of methods to do this, using casts… Maybe the level blueprint isn’t the best place to store the music event instance, you could also try in the game instance, not sure what’s the best.

1 Like

Thank you! I was able to figure it out. I ended up using casts like you mentioned.