[4.6]Possible bug or I'm doing something wrong. Multicast
Let me start off by saying that I am trying to debug a separate project but have rebuilt what I'm trying to accomplish in a brand new 3rd Person blueprint template project and I am getting the same results. Also I decided to post it here because it may be a bug. Basically what I am trying to do, I get a list of connected players. Simple enough, so I got the player array from GameState. Short note, I am using custom blueprint classes for every part of the GameMode (GameState,PlayerState,PlayerController).
I've also created two widgets. The first widget (HudWidget) has 3 components to it; A place where you can enter the name of your player, a place where you can enter your class, and on top right is a list of connected players showing their name and class. An Example Below: Bill the archer has been added manually.
On PostLogin (In Game Mode) I call an event on the player controller to display the HudWidget (works just fine). After that it calls an event on the widget itself to get the player array and add PlayerListItems to a scroll box. It loops through the PlayerArray and calls another event on itself to create the widget and add the child seen below.
Now for updating the list for everyone when any info is changed. Both TextBoxes have an on text committed that set the appropriate local variables then both call to an event back on the player controller passing in those changes. The event on the player controller is only called on the server due to the way mutlicast works (called on client wont replicate to other clients).
UpdatePlayerInfo is called on the server which gets the PlayerState casts it to the custom class I created and then sets their variables. Once complete it calls UpdatePlayerLists (Multicast) that just calls RefreshList on the widget from earlier. Unfortunately this doesn't work, and when Player info is updated on the server (by typing something in on the server window instead of client window) This happens: The client's (on right) view gets messed up, no longer receives input and after a while, the view goes completely black. 132 & dad are just default values set in the PlayerInfoWidget.
Perhaps this is a bug, but it may be that I am going at this the complete wrong way.
Problem solved. Turns out that because the event was in the PlayerController which was not replicated, the multicast would not function properly.
answered Jan 23 '15 at 01:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here