Announcement

Collapse
No announcement yet.

[Multiplayer] When a player populates a widget with own info the others can't see it.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Multiplayer] When a player populates a widget with own info the others can't see it.

    Hello!

    I'm working on a little poker game, I've used a multiplayer tutorial (this) to learn the basics and set up the menu, lobby, etc.
    Each player has a PlayerInfo structure, and I'd like to show the name, avatar and money to others, this is how far I got:

    Now if the host startes the game, the players load into the gameroom with the poker table, seats and others. What I'm trying to achieve is that when one player clicks on a seat to take it, the player's name, avatar and money should be shown at the seat. And there I hit a wall, when a player clicks on it, the information only shows up in that client, but not in the others. I know this is some problem with replication/refreshing others screen, but I simply can't find a solution for 3-4 days now and this makes me crazy.

    These are the blueprint parts taking part in this:
    https://imgur.com/gallery/lB5Z9pJ

    I'd really appreciate any help and will gladly provide any other information!

    #2
    Quick comment...

    Are you using a game instance. Great place to store variables for everyone to see.

    Comment


      #3
      Sure, but every seat contains a text|image|text, which calculated with a maximum of 8 players would be a lot of stored variable, and I belive there is a better way to do this. There should be some replication issue, but still couldn't figure out what's wrong.

      Comment


        #4
        I'm still looking for help, I got to a point where the server sees the clients after they take a seat, but the clients simply can't se anybody.

        Comment


          #5
          You can use playerstate or game instance as mentioned above. You do not need to put variables for 8 players but only for the current player (game instance is for current player/instance).
          So if you put in game instance or player state or else you will put the same number of variables.
          And when client join just pass variables from game instance (or player state) to the server (use repNotify or server->multicast in current player/seat BP).

          Comment

          Working...
          X