How to replicate an event to a specific client only?
I have a treasure chest where, if opened by a specific pawn, I want that specific pawn to only see the chest opening animation but other nearby clients including the server should not? I still want the server to give the client the items to prevent the cheating but visually-wise, the player on the server shouldn't know that the client opened the chest.
Client that you only want to replicate within an event can pass PlayerState.PlayerID into it via Server call. Then within the Server event, check if the passed PlayerID matches the current PlayerController's PlayerID. If so, then perform you want to replicate, otherwise, do nothing.
Below is my example:
Now that you know how to do it the hard way, here's the magic way of doing it:
Follow this question
Once you sign in you will be able to subscribe for any updates here