(Multiplayer)How Can I display Player Names in my game hud?

So I’ve managed to get the names to display correctly. There were several issues that were preventing me from getting it to work correctly. Firstly I’m not 100% sure if this was an issue ,but I was trying to populate the names into a widget that was created in my player character blueprint (i’m dumb). It should be setup in the playercontroller and called there or in the game mode during initialization.

As I said in a comment to the other answer, I based the logic on the events implemented in the lobbypc and lobbygm, another key factor was how to populate the horizontal box in the widget correctly. Here are some screenshots of events i used.

events in my game hud for populating the horizontal box:

events in my gamemode bp, keeping track of the connected players and populating the info into arrays to pass to the gamplayPC blueprint event.

Adding the info and calling the events made in the widget.

Setting up the widget in the player controller blueprint and calling everyone update after respawn event.

The most annoying and time consuming part of the whole process was testing if it works. The only way you can test if its working is to build the project and copy it to another pc. If you try in editor or on the same computer the game will use the same player info, displaying the same name twice.

-Samuelb

1 Like