How to determine player with most score?

komapatient

New Member
Reaction score
10
Okay I stumbled over a simple yet confusing question.

I have a map where players gain score throughout gaming. When the game ends after a set amount of time I want to see which player has the highest score and nominate him as winner making the others lose the game.

The score is saved in a simple Integer Array (1-8 for each player). The map is FFA, so each player has his own score to be compared!

Best thing would be if you could actually show me how create a ranking list put all players in ordered in descending player score...

Anything you can give me to at least have a creative glimpse?

Thx in advance!
 

simonake

New Member
Reaction score
72
Maybe complicated to explicate but...

Set each score to Integer or Real value array then...

Code:
Melee Initialization
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to 12, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                PlayerScore[(Integer A)] Greater than (Integer B)
                            Then - Actions
                            Else - Actions

Is it what you needed?
 

komapatient

New Member
Reaction score
10
Well it is not exactly what I needed yet you gave me a simple push where to start ;)

There is an absolute high score players cannot exceed - I will simply count through all score values and fill in Player Group array vars like First, Second, Third...

+rep for you ;)

Now I need a way of how to loop 'backward' - starting with the high score nominating the first players to occur to have it to be placed first :-s

If I start from the downside I may never fill the First Array Variable since several players could share a specific score.
 

simonake

New Member
Reaction score
72
I'll see if I could help you later... Now I gotta help someone to turn is We to english hehe XD

edit: ... I tought you could make groups like in sports.

Code:
Melee Initialization
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 2, do (Player Group - Add (Player((Integer A))) to GroupR1[1])
        For each (Integer A) from 3 to 4, do (Player Group - Add (Player((Integer A))) to GroupR1[2])
        For each (Integer A) from 5 to 6, do (Player Group - Add (Player((Integer A))) to GroupR1[3])
        For each (Integer A) from 7 to 8, do (Player Group - Add (Player((Integer A))) to GroupR1[4])
        For each (Integer A) from 9 to 10, do (Player Group - Add (Player((Integer A))) to GroupR1[5])
        For each (Integer A) from 11 to 12, do (Player Group - Add (Player((Integer A))) to GroupR1[6])

Then winner of each group fight with winner of another group. Maybe. It's hard.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top