Can you affect parameters/events for only a local event instance in a multiplayer game?

Hello!

I’ve been searching around and there have been questions about this topic, but I wanted to further clarify things for my specific use case if at all possible. I’m also very sorry in advance for the long post/question :sweat_smile:

Perfect Scenario for this multiplayer game:

Event A is triggered as a spatialized ability (so its not occurring consistently or looping after it’s triggered). Event A would cause all in-game sounds to have a band pass filter and volume ducking applied to them, but only for the person that triggered the ability. All other players only hear Event A’s audio spatialized like any other in-game sound.

Potential solutions I’ve tried:

So if I use a snapshot, the filter gets applied to all event instances for every player in the match instead of just the person using the ability. So I don’t think a snapshot is the way to go here.

  • Create a return bus in the mixer with the band pass and volume reduction I want on it. (We’ll call it Ducking_Bus)

  • Create a discrete parameter from 0 to 1 for when the ability is used (we’ll call it DUCKING).

  • Create a pre-fader send for Event B that I would like to be ducked, and send that to the return bus DUCKING in the mixer. The send is automated so that if DUCKING is set to 0, then the send is at - :infinity:, but if it’s set to 1 then the send volume becomes 0 db. The master fader for Event B is automated to be the inverse of this.

Assuming that solution 2 is the way I have to go but I have two questions:

Question 1)

Is there a way that I can avoid having to place this parameter on every single event instance that can play in-game?

Question 2)

Is there a way that I can get Event A to trigger the parameter switch from 0 to 1 in Event B inside of FMOD?

Any insight here would be very much appreciated!

This is entirely possible, and there are a variety of ways to do it. Before I can tell you which would work for your game, however, I need to know one thing: Is this a splitscreen multiplayer game where all players share the same device, or an over-the-network multiplayer game where each player plays on a different device? It sounds like the latter, but I do need to be sure.

Hey Joseph! Yeah it’s the latter. Over network multiplayer and no split screen multiplayer functionality.

In that case, the solution is simple: Use solution 1, and play an instance of the snapshot only on the device of the player who should hear that snapshot.

Remember that snapshot instances can be created and played from your game’s code in the same manner as events, without needing to use snapshot instruments. This means you don’t have to create complex trigger conditions to ensure the snapshot is only audible for some players and not others; you just need to ensure that whatever in-game action the player takes that causes an instance of the event to play also causes an instance of the snapshot to play. Because the other players did not perform that action in their instances of the game, they will not hear instances of that snapshot affecting the mix.

This is really promising so thanks so much already! The unfortunate part is that I’m not responsible for the code on the project at all. Would I be able to set up the snapshot reference inside of a blueprint in UE5 or would I have to rely on the programmer to do this for me? And follow up question to that, is there some documentation somewhere that I can show them that might make this process easier? Please forgive my ignorance when it comes to coding!

You can do this through blueprints, naturally. Any method you can use to create and play an instance of an event can be used to create and play an instance of a snapshot, because snapshots are a type of event under-the-hood. You could therefore use any of the blueprint components that can play events.

You will, of course, have to stop the snapshot instances once you no longer want them to affect the mix. Again, any method that can be used to stop an event instance can be used to stop a snapshot instance.