Strange behaviour Multiplayer + Widget

Hi, I don’t know what I’m doing wrong, I’m starting in multiplayer area. I hace a widget with a simple button, when a player click it, this button be autodisable and send a RPC to check if every player (4 in total) has been pressed (like if ready the party to start) for then the actually goal is the button be turned to invisible to everyone
I start placing the Widget UI in the Pawn BP, but unfortunately the “set to visible = false” node doesn’t work.
If I place the Widget in PlayerController BP, the button for every player turns to invisible except the Server (listener-client) one.
If I place the Widget in the GameState BP, every button (in each client) turns properly. But I suppouse is not right to place the Widget variable in this BP, doesn’t have so sense. Somebody feeled similar behaviour?

In addition, this is my sctrucure of calls:

1st) A event is called in the widget at button pression time. this event calls a “Run on Server” event in the Pawn BP (or PlayerController or GameState)

2nd) “Run on Server” event in the Pawn BP calls to a “Multicast Replicated” Event in the GameState

3rd) “Multicast Replicated” Event in the GameState call to Pawn BP to access to the Widget to manage the button

P.D. I’ve read the state of visibility after try to make Hidden, and returns like not visible although still been showing. Could be a reason the viewport be duplicated with networking?

Hi, check my screenshots and tell me what you think. my logic is

  • Player with authority calls widget creation broadcast, tells Gamemode to store the Waiting For Players list.
  • Gamestate tells every PlayerState to create their widget and store their references
  • When button is clicked, it executes a local event, do a Replicate on Server call to Gamemode (only server has access so it has to be a bridge)
  • Gamemode removes the PlayerState of the player who is ready and checks if the list is 0, if it is, tells GameState to remove the widgets.

hope it helps.

Thanks for your answer and also for your screenshot! Can I make this work for a dedicated server? Also if you have some time can you add me on skype, I have some little question (MySkype=> Consomer.yourself2). Thanks again !

i have no idea about dedicated servers cause i havent digged into that area, but in theory it should, instead of the authority calling the ready up, a player would be authorized by the server (you can use the ids to filter who is sending the signal). but again, i havent used dedicated servers and im fairly new on ue4. i dont use skype but you are free to add my on the epic’s launcher messenger.

Thanks for the cues! I’ll certainly add you tomorrow when I’ll be on my main computer :D. I just want to be sure, by ids you mean identify?

GameState has an array of PlayerState (as shown in one of my screenshots). each playerstate has a unique playerId. you could somehow use it as filter, not sure right now what kind of logic you could use as im not familiar with dedicated servers, but i guess that you could say something like “get the playerId of whoever sent the “create game” command and give him authority”. from what i understood from the unreal tutorials, you can pass the authority to a client, but again, havent searched for more info about that

just an insight about authority, you cant “pass” it, but can use it on a different way

https://hexode.xyz/2016/01/15/unreal-engine-and-network-replication/

Usefull link, thanks :slight_smile:

Thank you for response and your good detailed explain. Unfortunately still suffer strange response guided by your example. Just the difference are, the widget is showed after Begin Start event (in PlayerController) and in my GameState BP instead Get Player Character function I had used Get Player Pawn one, because I have simple Pawns like actors (not Character one). Tomorrow just for try I change it to Characters for test.

i recommend you to go with my BP first, understand how it works and then tweak it to your needs and start creating your own.i forgot to add the BP of my Gamemode, but i doubt it will do any difference. onPostLogin, it spawns the character and assign the controller to it. sadly i already deleted this project so i cant do any more testing on this.

I have start from scratch a FP project and same response, you done in 4.11.2 version?.
Should be something else I’ve omitting or I’m in a depth nightmare ^^(

this is done in 4.11.2. if you can, upload me all your blueprints, try not to ommit anything (just blueprints, ill see what i can do)

There are the stock BP up to FP template as well, you can overwrite them or ignore, those aren’t edited. Personal ones pends from those classes.
Thank you in advance!.

link text

cant open your gamemode cause it says it derives from a missing class. are you using any kind of plugin?

made my own gamemode and modded what needed to be modded. please see this. its not refined but should give you the idea on what to do
https://drive.google.com/open?id=0BxVkFZ_FgTxQTHZpRzFvSHc0X0U
ADDED: note that you have to set the GameMode to FirstPersonGameMode (from the rar) and set all the classes to the classes to the one from the rar. just create a new template and try to plug in the content.

MyGameMode pends to stock FirstPersonGameMode and is simplest proyect/test, no plug-in as well.
With yours BP still has the issue… damm it…

Today has released the 4.12 vs., I’m gonna to download and test over it for try is the paranoid disappears.

Sorry for the delay of responses, I just could be 1 o 2 hours for family and work tasks.
Thank you again for your help and time. Much appreciated it!

i added the same .rar i uploaded into a fresh new template and it worked after setting the gamemode, gamestate, etc etc classes on the new project. you must be doing something wrong.