I really have no idea what I am doing wrong, and I am tired of slamming my head into a table. I almost feel like there is a bug in the galaxy editor at this point, but perhaps not. I am trying to create a leaderboard for a TD that I have been developing. Here is the code I have for my map initialization:
MeleeInitializationEventsGame-MapinitializationLocalVariablesConditionsActionsVisibility-DisableFogOfWarvisibilityVisibility-DisableBlackMaskvisibilityTimer-CreateatimerwindowforSpawnTimer,withthetitle"Until Next Wave",usingRemainingtime(initiallyHidden)Variable-SetSpawnTimerWindow=(Lastcreatedtimerwindow)Camera-Panthecameraforplayer1to(CenterofCameraStartRegion1)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDousesmartpanningLeaderboard-Createaleaderboardwith3columnsand(Numberofplayersin(ActivePlayers))rows,withthename"Scoreboard",andusing(100%,100%,100%)color.Variable-SetScoreBoard=(Lastcreatedleaderboard)Leaderboard-Showallleaderboardsfor(Allplayers)Leaderboard-Set(Lastcreatedleaderboard)itemtextatcolumn2androwHeaderto"Lives"Leaderboard-Set(Lastcreatedleaderboard)itemtextatcolumn3androwHeaderto"Kills"Leaderboard-SettheautomaticplayercolumnforScoreBoardtocolumn1(DoNotgroupbyteams)General-Pickeachintegerfrom1to(Numberofplayersin(ActivePlayers)),anddo(Actions)ActionsDebug-Display(Combine("Setting Player ",(Text((Pickedinteger)))," lives to: ",(Text(PlayerLives[((Pickedinteger)-1)]))))asdebugoutputusingType1,andDodisplayitinthegamewindowDebug-Display(Combine("Setting Player ",(Text((Pickedinteger)))," kills to: ",(Text(PlayerKills[((Pickedinteger)-1)]))))asdebugoutputusingType1,andDodisplayitinthegamewindowLeaderboard-SetScoreBoarditemtextatcolumn2androw(Pickedinteger)to(Text(PlayerLives[((Pickedinteger)-1)]))Leaderboard-SetScoreBoarditemtextatcolumn3androw(Pickedinteger)to(Text(PlayerKills[((Pickedinteger)-1)]))Leaderboard-Addplayer(Pickedinteger)toScoreBoardTrigger-RunInitializePossibleTurrets(CheckConditions,Waituntilitfinishes)Trigger-RunStartBuildingPhase(CheckConditions,Waituntilitfinishes)
I have also tried making it simpler by just setting all the row values or statically setting text, but nothing I do seems to matter. I end up with a leaderboard that has "Local Player", and both the appropriate headers, but no data in the actual board. The debug statements even print "Setting Player 1 lives to 20" and "Setting Player 1 kills to 0" in game, but nothing actually gets set. Any help would be greatly appreciated...
I'm not entirely sure how row headers are counted/work, but you may want to consider adding an additional row for your leaderboard, i.e. active players + 1. The first set of data MIGHT be counted on row 2; I don't know as I have not personally messed with row headers but I figure it's worth suggesting.
I also recall having some issues with an automatic player column - it did not want to seem to accept any sort of title whatsoever.
In general, it seems like you may be missing some settings. What about the leaderboard column width & row height?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I really have no idea what I am doing wrong, and I am tired of slamming my head into a table. I almost feel like there is a bug in the galaxy editor at this point, but perhaps not. I am trying to create a leaderboard for a TD that I have been developing. Here is the code I have for my map initialization:
I have also tried making it simpler by just setting all the row values or statically setting text, but nothing I do seems to matter. I end up with a leaderboard that has "Local Player", and both the appropriate headers, but no data in the actual board. The debug statements even print "Setting Player 1 lives to 20" and "Setting Player 1 kills to 0" in game, but nothing actually gets set. Any help would be greatly appreciated...
@Honz: Go
Bump...
@Honz: Go
Going to try one more bump, because I still can't get this working at all...
@Honz: Go
I'm not entirely sure how row headers are counted/work, but you may want to consider adding an additional row for your leaderboard, i.e. active players + 1. The first set of data MIGHT be counted on row 2; I don't know as I have not personally messed with row headers but I figure it's worth suggesting.
I also recall having some issues with an automatic player column - it did not want to seem to accept any sort of title whatsoever.
In general, it seems like you may be missing some settings. What about the leaderboard column width & row height?