Forum Discussion
1st, 2nd, and 3rd place winners on a podium
I have build a very robust game for my new hires as a review of topics presented. Now I would like to add a Podium to the end of the game. I have figured out the 1st and 3rd place winners, but cannot pass the hurdle of the 2nd place winner. Points are gathered throughout the game and at the end scores to be reviewed to report 1st, 2nd, and 3rd Place winners. 2nd place requires a way of comparing all players scores to determine rank. Any pointers?
- WaltHamiltonSuper Hero
I can't imagine a way of finding 1st and 3rd place that couldn't be adapted to find 2nd. Maybe you'd better attach your .story file here, so someone can take a look at it.
- MichaelLarsenCommunity Member
A second pair of eyes might be the right fix to the issue. see attached podium
- WaltHamiltonSuper Hero
Try the attached sample. I wrote triggers only for players 1 - 4. You need to go to layers first, second, and third place, and add the rest of them to each layer. Each player has two triggers. Copy the triggers for player4, paste them, and change all occurrences of player4 to the corresponding variable for player5.
I also added logic to (somewhat) handle scores that are equal. It doesn’t list a tie (which would take a lot more effort and changes to the podium). It just gives the place to the player that comes first, and gives the other player the next place.
Actually, I think it might be easier to sort these in JavaScript, and return the first three names and scores, but I’m not at the moment where I can fiddle with JS. Besides, I dislike using JS except as a last resort, because it prevents future maintenance if there isn’t someone available that can program JS.
- MichaelLarsenCommunity Member
WOW - Thanks for the input!!! I see I was going about it the hard way. Again, thank you very much for your time and the instruction!!! I am incredibly grateful for this help!!!!
- WaltHamiltonSuper HeroYou're welcome. PIAWYC (Pass it along when you can).