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"

(Multiplayer) I want the player to be able to change the colors of their character but the color variable won't replicate.

Like the title says, I want the player to be able to change their color using R, G and B sliders, the player sees that their color changed but can't see the other player's color change. I think it has something to do with how the game instance isn't meant for multiplayer replication(?) and if it isn't meant for it, could someone tell me what else I should use.

(I need the variables to keep their values when levels change, that is why I'm using a game instance)

Edit: The player sees their colors on other players.

The Game State: alt text

Setting the Game state variables from the player options widget: alt text

Setting The player's material: alt text

(There is a Switch has authority and a set body color multicast connected to the "Then 1

Product Version: UE 4.20
screenshot.png (411.5 kB)
screenshot.png (318.4 kB)
screenshot.png (220.0 kB)
more ▼

asked Nov 15 '18 at 03:42 AM in Blueprint Scripting

avatar image

26 2 5

avatar image jaidendc Dec 11 '18 at 06:04 AM

still having a problem...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Game Instance will preserve its variables when you join the server's level, but will not replicate, so I use Game Instance to keep track of the settings, then pass them from Client's playercontroller to do a Server RPC, then from the server's red RPC event node to Multicast (from the Game State!) to propagate those settings to all clients so they can see the color change in their version of the universe.

For some reason Server RPCs don't work if you do them from an actor that's not a playercontroller or part of the playercontroller's hierarchy, and multicasts don't work if you don't do them from a GameState or part of the GameState's hierarchy. Maybe other actors can do these things but I have mixed results. Those are the way to make sure it always works.

more ▼

answered Nov 15 '18 at 07:18 PM

avatar image

3.8k 18 23 20

avatar image jaidendc Nov 16 '18 at 02:07 AM

could you provide a screen shot?

avatar image jaidendc Nov 16 '18 at 03:31 AM

Alright, I think I'm getting closer to the answer, now the player see the default color on the other players!

avatar image jaidendc Nov 19 '18 at 07:05 PM

I'm still having a problem, could anyone help me?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Game Instance is not replicated.

Game State is replicated and should be used for game related information such as this.

more ▼

answered Nov 15 '18 at 04:22 PM

avatar image

1.2k 31 8 33

avatar image jaidendc Nov 15 '18 at 06:30 PM

ok, I'll tell you if it works later.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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