Shouldn’t be that hard, just grab some details all of the others player states and display it on a lobby screen, shouldn’t be that hard. What’s the catch?
It sounds like a poorly scripted movie currently doing the rounds at carnies film festival but its what I have been dealing with for, let’s say for my mental sanity, too long.
Here’s the setup. Each Player state has a Display Name and Avatar variables, Text and Texture2D respectively. (yes i know player state already has a player name shhh) Each Variable is set to replicated.
Player State Blueprint below gets the details from the Game Instance and sets it
The setup continues such as drawing Widgets etc…
This logic in the pawn adds each player state as children to a scroll box which I have on my lobby menu. I will post the image but be warned, little neatness effort has gone into this as I have spent far to long rearranging things using player controllers, game modes, game states, different arrays etc to try and get this to work. It is the scribblings of a mad man.
So you don’t have to look at what links up with that I’ll ASCII art it for you.
PopulateList Custom event → Clear Scroll box Children → Get all actors of class (Lobby Pawn) → for each loop → Get the player state casting it as JMPlayerState custom state BP ripping out the Player and Avatar shoving it into a widget and adding it as a child.
See any issues yet? Keep reading.
Let me be clear, I’m aware the host can only see 1 person. Thats fine because I haven’t fixed the refresh to happen on a regular basis. I’m more concerned the client can see 2 of themselves. At least the number of people adds up…
I have scowered many forum articles, youtube videos trying and pleading that they may have a different approach to one I have tried. Yet here I am 20 hours later no closer.
Any help is greatly appreciated.