• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Help]Leaderboards

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
I like to make an Ending System where I could show the players the leaders on a specific field.
Example
Player 1 has 300 gold and Player 2 has 500 gold and Player 3 has 700 gold
Player 1 has 3 kills, Player 2 has 1 kill, and Player 3 has 2 kills
Player 1 has 1 deaths, Player 2 has 10 deaths and Players 3 has 5 deaths

Now to show the players the leaders
Gold Hoarder (The Player with the most gold saved): Player 3
The Killer (Player with the most kills): Player 1
Undying Death (Player with the most deaths): Player


Hope you can help me. Please. help me. :ogre_kawaii:
 
Level 9
Joined
Apr 26, 2011
Messages
403
  • set string_top_gold = ""
  • set string_top_kill = ""
  • set string_top_dead = ""
  • set highest_gold = 0
  • set highest_kill = 0
  • set highest_death = 0
  • for every player in your player group do:
    • set temp_integer = player number of picked player
    • if Gold_variable[temp_integer] > highest_gold then
      • set highest_gold = Gold_variable[temp_integer]
      • set string_top_gold = player name of picked player
    • end if
    • if kill_variable[temp_integer] > highest_kill then
      • set highest_kill = kill_variable[temp_integer]
      • set string_top_kill = player name of picked player
    • end if
    • if death_variable[temp_integer] > highest_death then
      • set highest_death = death_variable[temp_integer]
      • set string_top_dead = player name of picked player
    • endif
  • end for loop
  • Game - display message to everyone : "Gold Hoarder:" + string_top_gold
  • Game - display message to everyone : "The Killer:" + string_top_kill
  • Game - display message to everyone : "Undying Death:" + string_top_dead
 
Level 11
Joined
Aug 1, 2009
Messages
714
  • set string_top_gold = ""
  • set string_top_kill = ""
  • set string_top_dead = ""
  • set highest_gold = 0
  • set highest_kill = 0
  • set highest_death = 0
  • for every player in your player group do:
    • set temp_integer = player number of picked player
    • if Gold_variable[temp_integer] > highest_gold then
      • set highest_gold = Gold_variable[temp_integer]
      • set string_top_gold = player name of picked player
    • end if
    • if kill_variable[temp_integer] > highest_kill then
      • set highest_kill = kill_variable[temp_integer]
      • set string_top_kill = player name of picked player
    • end if
    • if death_variable[temp_integer] > highest_death then
      • set highest_death = death_variable[temp_integer]
      • set string_top_dead = player name of picked player
    • endif
  • end for loop
  • Game - display message to everyone : "Gold Hoarder:" + string_top_gold
  • Game - display message to everyone : "The Killer:" + string_top_kill
  • Game - display message to everyone : "Undying Death:" + string_top_dead

Can you please specific it??? I don't get it. but thanks +rep
 
Status
Not open for further replies.
Top