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"

Replicating usernames

Hello !

I have a local database that I plan to store on a machine along side a dedicated server for communication. When I pull a username from that database, I want it to happen on the server and replicate the username to the relevant client, Instead I am changing the username for everybody connected every time I pull one.

For example;

ON SERVER : I use the "Game State" to pull the Username from the database, then I set the username to a replicated variable.


ON CLIENT : I pull the username from the game state and display it on a widget.

What would be the proper way of doing this, should I even be using the Game state for this?
I'm using it because it's the only one I have found to replicate.

Product Version: UE 4.12
more ▼

asked Oct 10 '16 at 01:32 AM in Blueprint Scripting

avatar image

126 13 18 25

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

1 answer: sort voted first

for player related, you should use player state, I use this to replicate to evveryone the steam pseudo of my players ;)

more ▼

answered Oct 10 '16 at 07:02 AM

avatar image

830 31 12 38

avatar image TheMunky Oct 10 '16 at 01:25 PM

Okay so GameState replicates to all clients and Player state replicates to the relevant client?

avatar image mdonge Oct 11 '16 at 06:13 AM

GameState And playerState are both replicated to all clients, but game related data should be in gamestate and player related data should be in player state.

eg : time remaining before end of the match is in gamestate and player health is in playerstate

only player controller isn't replicated to all players : server has all of them, and player have only their own version ...

avatar image TheMunky Oct 11 '16 at 11:39 PM

Okay, thank you, I don't fully understand why it acts differently if the replication is exactly the same but changing it from GameState to PlayersState seemed to work.

(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