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:
- You can target them from the Server with a ClientRPC on an Actor they own, such as the PlayerController, PlayerState or PlayerCharacter/Pawn. This guarantees that the event creating the sound will execute only on this one Client.
This is usually use for UI Sounds, such as a “Double Kill” in a UT match. - You can use 1. also for overlaps if you limit these to “Authority” using a SwitchHasAuthority node in Blueprints.
- If you don’t want to use an RPC when an Overlap happens, but you still want to target the local player, you can simply compare, inside of the Actor the Character/Pawn is overlapping, if the “OtherActor” is == to the “GetPlayerPawn/GetPlayerCharacter”, because this node will always return the local player’s Pawn/Character and the comparison will never be true on other players.
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.
Cheers!