Different colors on different clients. (Lyra perspective)

I want to achieve that: if you play on TeamA you see your teammates with blue colors and see enemies with red colors. TeamB on the other hand will you with red color and their teammates with blue color.

I already started to implement it this way (overriding Lyra’s Shooter Mannequin):


Its a turn based game. (turns end when all players die from one team)
When i hit play with 4 clients, everything is fine all the time, but from the 2nd round at least one player will have the colors badly set up…

Use a Rep_Notify Team (enum) in the character class. Have the Server set that value when it spawns the character… OnPostLogin (Gamemode) is a good option.

The OnRep_Team function will apply the colors to the mesh skins.

How can the server set these colors?
Every player should see their enemies red and their allies blue. Isn’t it happening locally? (because each player has different enemies and allies)

The character class replicates. So you have the server proxy of the character class “Set” the repnotify var for which team. When you set a repnotify the Onrep function executes. Therefore when all other players get that replicated variable for your character they will execute the onrep function and make the changes locally.