- Joined
- Oct 16, 2013
- Messages
- 63
- Reaction score
- 9
- First Language
- German
I'm having a hard time with a ranking system. Basically I'm trying to create a dynamically updated leaderboard. The problem is to give everyones team its proper rank.
Every team has a variable for the current score and a second variable for the rank. How can I set the rankvariable based on the highest score each team has?
For better understanding:
Team 1 has a score of 10 (variable 1 = 10)
Team 2 has a score of 5 (variable 2 = 5)
Team 3 has a score of 15 (variable 3 = 15)
Team 4 has a score of 2 (variable 4 = 2)
#edit thanks SumRndmDde
Team 1 is Rank 2 (variable 5 = 2)
Team 2 is Rank 3 (variable 6 = 3)
Team 3 is Rank 1 (variable 7 = 1)
Team 4 is Rank 4 (variable 8 = 4)
Result:
Rank Team Score
1 Team 3 15
2 Team 1 10
3 Team 2 5
4 Team 4 2
I've seen some array sort chenigans in other forums, but can't translate it to be used in MV. Any help would be greatly appreciated!
Every team has a variable for the current score and a second variable for the rank. How can I set the rankvariable based on the highest score each team has?
For better understanding:
Team 1 has a score of 10 (variable 1 = 10)
Team 2 has a score of 5 (variable 2 = 5)
Team 3 has a score of 15 (variable 3 = 15)
Team 4 has a score of 2 (variable 4 = 2)
#edit thanks SumRndmDde
Team 1 is Rank 2 (variable 5 = 2)
Team 2 is Rank 3 (variable 6 = 3)
Team 3 is Rank 1 (variable 7 = 1)
Team 4 is Rank 4 (variable 8 = 4)
Result:
Rank Team Score
1 Team 3 15
2 Team 1 10
3 Team 2 5
4 Team 4 2
I've seen some array sort chenigans in other forums, but can't translate it to be used in MV. Any help would be greatly appreciated!
Last edited by a moderator:
