- May 9, 2017
- 56
- 58
Hello.
Well, I'm developing my first game on Twine using SugarCube, but I've reached a point where I'm stuck. Let's see if someone can help me, please.
- In the game there is a leaderboard with three columns, one for the team name, one for the wins and one for the losses. Each cell is assigned a variable, so you can put the results: First Ranked Team Name ($West1), First Ranked Team Wins ($WinsWest1), First Ranked Team Losses ($LossesWest1), etc.
- Then I have established the 22 teams as objects, as follows:
<<set $Boston = {
Name: "Celtics",
Wins: null,
Losses: null,
}>>
- Then I have managed to simulate all the games, so that each team is assigned the wins and losses.
- Now comes the problem: How do I compare the victories of each team, so that they are ordered in the table from highest to lowest, with their names, wins and losses?
Thank you very much in advance![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Well, I'm developing my first game on Twine using SugarCube, but I've reached a point where I'm stuck. Let's see if someone can help me, please.
- In the game there is a leaderboard with three columns, one for the team name, one for the wins and one for the losses. Each cell is assigned a variable, so you can put the results: First Ranked Team Name ($West1), First Ranked Team Wins ($WinsWest1), First Ranked Team Losses ($LossesWest1), etc.
- Then I have established the 22 teams as objects, as follows:
<<set $Boston = {
Name: "Celtics",
Wins: null,
Losses: null,
}>>
- Then I have managed to simulate all the games, so that each team is assigned the wins and losses.
- Now comes the problem: How do I compare the victories of each team, so that they are ordered in the table from highest to lowest, with their names, wins and losses?
Thank you very much in advance