how do you make a sound only hearable by one person
I want to attached a sound effect to an object and have that sound effect only hear by one of the players in a multi-player game. I have not yet found a way to do that so if anyone has any ideas I would appreciate hearing them. Thanks!
asked Jul 16 '14 at 05:36 PM in Using UE4
So to give this question a somewhat final answer:
In Online/LAN Multiplayer, so with actual Server and Clients, you can limit Sounds and other events to a specific person multiple ways:
Now for Splitscreen, as mightyenigma asked, it's questionable how much sense it makes to split this. All players are on the screen, all players are using the same audio output, this means playing it on Player 1 or 4 makes no difference if it comes to UI sounds.
For sounds that are relative to a location (3D sound), you should be able to refer to a player via their PlayerController, Pawn/Character or PlayerState, similar to the Online/LAN version. Of course an RPC is not required, as this is all local and all actors are non-networked. If you need to support both at the same time (Online and Splitscreen), then the best solution is to implement the Online/LAN stuff and then see if that works out for Splitscreen for you.
In the end it's depending on the situation in which the Sound is played. Different situations allow different ways to limit the Sound via RPCs, SwitchHasAuthority, simple comparison of actors etc. I'd suggest, if any of you have a specific problem with a specific situation, to simply open a new question explaining the situation to then receive a proper, aimed at your problem, answer.
answered May 17 '19 at 07:05 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here