Has this been resolved?
Trying to create a top 5 leaderboard, but all the names have Anonymous. It’s totally ridiculous that in order to get a top 5 leader board you need 5 overlapping Billboards. Why doesn’t Epic resolve this?
GetTop5():void=
AllPlayers := GetPlayspace().GetPlayers()
var id:int = 0
var x:playerScore = playerScore{Score:=0}
Scores:[]playerScore =
for (Agent : AllPlayers, TeamPlayer := player[Agent]):
if (Value:=PlayerMap[TeamPlayer]):
set id += 1
Value.SetID(id)
set x = playerScore{Score:=Value.Score, PlayerId:=id}
else:
set x = playerScore{Score:=0, PlayerId:=0}
Sorted := Sort(Scores, false, CompareScores)
var lastIndex:int = Sorted.Length
if (lastIndex > 5):
set lastIndex = 5
var Lines:[]string = array{"","","","",""}
for (Index := 0..lastIndex - 1):
if (Item := Sorted[Index]):
for (Agent : AllPlayers, TeamPlayer := player[Agent]):
if (Value:=PlayerMap[TeamPlayer]):
Pid:=Value.GetID()
if:
Item.PlayerId = Pid
then:
S:=Localize(ScoreText(Index + 1, TeamPlayer, "{Item.Score}"))
if (set Lines[Index] = S) {}
if:
Billboard1:=BillboardRanks[0]
Billboard2:=BillboardRanks[1]
First:=Lines[0]
Second:=Lines[1]
Third:=Lines[2]
Fourth:=Lines[3]
Fifth:=Lines[4]
then:
Billboard1.SetText(Top5Text(First, Second, Third, Fourth, Fifth))
Billboard2.SetText(Top5Text(First, Second, Third, Fourth, Fifth))