What do you mean by sort the dialog by kills? Do you want to sort the kills into catagories, do you want to sort them by the type of unit killed, do you want to sort the by who has the most kills. A little light into what you are doing would be appreciated. :)
You're going to need to do a bubble sort against parallel arrays (one array holding kills, another holding the player Ids) and then update your dialog accordingly.
from the example map, how would you find the specific "rank" for each player?
for example, player 1(red) has most kills, so he is at the top of the leaderboard, and I want to display a big "#1" on his screen
if he is in 2nd place, then a dialog would display a big "#2" on his screen
is there anyway to get the "rank #" for that player?
(i looked at the variables in the example map, and see a "rank variable" but it doesnt match up to the actual rank that the player is)
I displayed the "rank variable" in the debug, and doesnt always match up (player 1 has most kills and top of the leaderboard but the "rank variable" displays 4................posted screenshot)
Is there someway to return the actual rank of the player so I can display a dialog that shows a big "YOU ARE RANK #..."
I have a leaderboard that is made of dialogs (with images as portraits, etc)
How do you sort a dialog leaderboard by kills though?
Thanks in advance
What do you mean by sort the dialog by kills? Do you want to sort the kills into catagories, do you want to sort them by the type of unit killed, do you want to sort the by who has the most kills. A little light into what you are doing would be appreciated. :)
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Since it's a dialog, and not an actual leaderboard element, you'll have to re-populate the dialog every time you want it updated.
So the loop that you use to fill out all the variable values, you'll want to run that again with the new order of players based on current kills.
That sounds like a lot of updating to me though.
You're going to need to do a bubble sort against parallel arrays (one array holding kills, another holding the player Ids) and then update your dialog accordingly.
yea to clarify what i want is the player with most kills on the top slot, player with the 2nd amount of kills in the 2nd slot etc,
What is bubble sort? what are the actions i should use to actually sort the amount of kills?
essentially you need to run a periodic check that sorts the players on kills into the correct order, here i'll work on an example map for you.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
When players are tied for kills it will go with the highest numbered player.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Thanks!
going try it out right now! :)
from the example map, how would you find the specific "rank" for each player?
for example, player 1(red) has most kills, so he is at the top of the leaderboard, and I want to display a big "#1" on his screen
if he is in 2nd place, then a dialog would display a big "#2" on his screen
is there anyway to get the "rank #" for that player?
(i looked at the variables in the example map, and see a "rank variable" but it doesnt match up to the actual rank that the player is)
I displayed the "rank variable" in the debug, and doesnt always match up (player 1 has most kills and top of the leaderboard but the "rank variable" displays 4................posted screenshot)
Is there someway to return the actual rank of the player so I can display a dialog that shows a big "YOU ARE RANK #..."
Thanks
like this? it seems to work for me?. check it out closely. make sure you understand the triggers if you don't just ask me.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
yea i think i may have messed up somewhere with the active players/all players/and the general debug message lol
works now
you are super awesome, thanks!