How should I go about hiding dead players to the living, but still being visible to the dead?

Hey,

I’ve been struggling with figuring out how to show dead players characters to other dead players, but keep them hidden from the living. As it stand, I’m using the Game Mode to send a Server RPC to the character to SetHiddenInGame with the OnRep_HiddenInGameChanged after the bVisibleToOtherPlayers has been replicated. Hiding the player from other players works fine, but I’m not sure how I should go about searching the other players in the scene and unhide them from the newly deceased character. Any insight on how to search for the players and where would be greatly appreciated.

Thanks

The problem was when the Game Mode was changing their visibility the constructor of the character was changing a setting afterwards. I just had to set a time for a second delay then change the visibility.

You most likely don’t need to search for other characters.
When any of your characters die server should notify all clients that Character A is now dead.
The client receives that someone is dead and shall decide whether it can see a dead character or not based on their own status.
When the player dies it should iterate through every other character and make them visible locally.