x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

alt text

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.

alt text

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)

alt text

Which then calls this blueprint in the GameInstance: (GameInstance)

alt text

Which then calls the following, finding a free player start and spawning the character on the map and posses this: (Ingame_PlayerController)

alt text

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 :)

Product Version: UE 4.12
Tags:
teamselect.jpg (31.5 kB)
colorsnotright.jpg (147.0 kB)
jointeam.jpg (79.4 kB)
more ▼

asked Jun 23 '16 at 11:06 AM in Blueprint Scripting

avatar image

Risager
38 3 5 8

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Here a pic of my blueprint setting the color in my struct

alt text

And a pic of the blueprint in my charater.

alt text

more ▼

answered Jun 23 '16 at 11:08 AM

avatar image

Risager
38 3 5 8

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question