Download

Sound replication in UE4 is a joke

We are working on a FPS game and have encountered what appears to be a serious issue preventing the replication of sounds (jumping, shooting, etc) in multiplayer.
To put it simply: sounds do not play between clients so we cannot hear each other.

For starters we’re attempting to make our jump sound audible to all connected players on the dedicated server. No luck in hell.
This is our blueprint setup:

Why can’t we hear our jumping sounds while in multiplayer? Does UE4 really have that much trouble accomplishing the simplest of tasks? Playing a sound in multiplayer should be a basic feature, and hopefully we’re just making some mistake here.

Is there some secret information we should learn in order to pull this off? Please…

pease dont blame the engine with your “is a joke” threads if you dont understand the features…

in this case your “Jump Server” event is never be called because in a multiplayergame only the server is “authorised”… and you input is called on a client

If I remove ‘Switch has Authority’ it still doesn’t work. I’m not getting it. We’ve been playing around with the blueprints for days and can’t fix the issue as of yet.

yeah your event is replicated form server… and you just call it on a client

however its not best practice to replicate this kind of sounds. I recommend to add NotifyPlaySound to your animation. This way it will fit to your jumpanimations on every client independent from lag/ping or something and also need no trafic.

After the Jump you have to make a Event “Replicate to Server”. And From that Event you make another Event “Multicast” which then spawns the sound.

Ok, **I have fixed the problem :)**but I have a different issue:

the sound itself isn’t directional (is always played at full volume) so you always hear it as if the other player was up close to you instead of changing volume based on the distance between 2 players.

This is the current blueprint:

Hopefully we can close in on this issue.

You need to play around with the sound attenuation. You can find it in the cue editor for example:

Play around with the distances and the sound will behave correctly.

Ok, the sound now has attenuation but is still not directional (3d). You always hear it played in both headphones. How do I set up directional sounds?

I believe what you’re looking for is the spatialize flag which is also part of the attenuation settings. Do keep in mind that only mono sounds are able to be spatialized.

It works for me. Thanks!