What's the proper way to create sounds in multiplayer?

So in this multiplayer game im working on im trying to get the firing sound to play on the client (which I’ve done) and play it a second time but this time so that everyone else hears the sound and not the client because on any amount of ping you can hear it twice ive googling it but can’t find what im looking for.

You need to have the server execute an event on all other clients (Multicast), excluding itself.

The event checks the local/network role and then spawns sound at location or better plays a sound on a audio component attached to the weapon muzzle.

Pretty straight forward.

Like this right? because when i did a print string it said the two values were the same on each screen so it was always true did i do something wrong? (thanks for the help by the way)
values

You aren’t excluding the server, nor the Owner from playing the sound.

Autonomous Proxy: Controlled player on a client instance.
Authoritative Proxy: Servers copy of each player.
Simulated Proxy: Copy of you/other players on other clients.

The Autonomous plays its own sound on event action (trigger pull). Then it calls the server (Run on Server event). Server event runs a multicast (execute on all clients including server). You need to Exclude the Server and the Autonomous from running the multicast logic.

You do this with Role condition check.

Get Local Role → is == Simulated Proxy → Branch (True): Play Sound.

Yea i got it thanks man!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.