Team Color not replicating as thought
Hey Guys. First of im fiarly new to this game development and i have started on making a multiplayer game. I got the multiplayer part working, and is now stuck with a problem i cant seem to resolve. When my clients (and server) travels to a level, they first spawn as a spectator pawn, and gets displayed a team select menu.
If i play this with 4 players in my unreal engine (same if package), i have the following problem. The last client to joins sees all the other players in correct colors. Yet the first joined only sees him self in the correct color. Its like the server isn't getting updated.
So as you can see. The server joined first, and sees only himself in red. Client 3 joining at the last one sees all in red.
When a player selects a team the following blueprint is run: (Ingame_PlayerController)
Which then calls this blueprint in the GameInstance: (GameInstance)
Which then calls the following, finding a free player start and spawning the character on the map and posses this: (Ingame_PlayerController)
After this event the set team color event gets called. (Ingame_PlayerController) Here i store the team color in a struct based on a unique ID on each player. This is then accessed in the player charater being spawned. Thereby setting the color of the spawned player.
Going to add two more pictures in a comment if i can :)
Here a pic of my blueprint setting the color in my struct
And a pic of the blueprint in my charater.
answered Jun 23 '16 at 11:08 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here