How to make sure that the sound is heard only by one of the players in multiplayer? Like, for example, he received an achievement, and only he hears the sound of receiving the achievement
You can make a Client RPC to start the sound in the actor, make the desired client (player controller) the owner of this actor, then the sound will start only for this client.
You can also make a Multicast RPC, but additionally pass a reference to the player controller. Clients cannot have references to other players’ controllers, so the reference will be valid only for its own controller. Then the validity check will help determine whether anything needs to be done further.
But this method is more vulnerable to cheating, so it should be used with caution.
2 Likes
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.