Create a new Row for each connected Player

Hello, I’m trying to create a Scoreboard widget using a Grid Panel constructor, being Row 0 where the Placeholders will be, whilst on Row 1 it displays the stats for each player connected to server:

And on widget BP construct, I get the values of each variable (in this case I’m only getting the PlayerName):

Now I’m having trouble in creating a new row for each connected player, can someone help me in doing it? I guess I’ll need to use a ForEach but I can’t wrap my hand around on how to achieve this.

Thank you.

Hello,

Yup, for each is the way.

You need to connect the ping exec from an entry point (Like, when you open the scoreboard).

For each Loop is well… a loop who iterate over all the element of an array.
So in your array is Player1, Player2, player3,

Loop body will go for player1, the player2, then player3.
When it reach the end, it go to completed.

You will get the name from Array element.

Thanks for the heads up, I had to create a sub-widget to get all of the PlayerStats and now the ForEach is running as intended.