Is there a way to fade out other events & mixer groups according to relative distance while maintaining volumes at that distance?

Hey there greater minds than mine,

Here’s a scenario:

There are multiple actors in the game world; some are AI and some are other players via online & splitscreen multiplayer.

  • Player A (let’s say this is you) is roaming around, doing its thing.
  • Player B (an AI or online player in this instance) picks up an item that gives it a status effect with a musical jingle that lasts for the full duration of the status effect. For the Player who picks this item up, there’s a snapshot which cuts music to allow the jingle to play cleanly.
  • As Player A approaches Player B, ambient music fades out for Player A and Player B’s status effect jingle increases as Player A gets closer.
  • As Player A retreats, Player B’s status effect jingle decreases in volume and ambient music comes back in.

I’m not sure if this is a job for the AHDSR; I want the fading in & out to maintain their values, for example if Player A is 10 arbitrary units away and stays there, the volumes would potentially be split 50/50 between Player B’s status jingle and Player A’s ambient music.

How might I go about doing this? I’m open to any and all suggestions, as this scenario is likely to be repeated with different items in our game. While I don’t know code myself, there are people on the team I can give that info to if required.

Thank you!

You may want something like that:

The jingle event also plays a snapshot which ducks the BGM bus, and the snapshot’s intensity is automated on the distance built-in parameter.

This is exactly what I needed - thank you!