• 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.

[Trigger] LeaderBoards

Status
Not open for further replies.
Level 4
Joined
Feb 27, 2008
Messages
71
Hey can anyone help me to make a Kill Count LeaderBoards from Player 1 to Player 10 and whos get Most kill will stand on the top and that so have low kill
will stand on the buttom

Btw : Sorry in not so good in english hope you understand me :wink:
 
Level 7
Joined
Mar 12, 2006
Messages
407
  • Leaderboard
  • Events
    • Time - Elapsed game time is 0.01 seconds
  • Conditions
  • Actions
    • For each Integer A from 1 to 10 do
      • Loop - Actions
        • Leaderboard - Create a leaderboard for (player(Integer A) titled Kills
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Player(Integer A) controller) Equal to User
            • (Player(Integer A) slot status) Equal to Is playing
          • Then - Actions
            • Leaderboard - Add (Player(Integer A)) to (Last created leaderboard) with label (Name of (Player(Integer(A)) and value 0
          • Else - Actions
      • Leaderboard - Show (Last created leaderboard)
  • Kill update leaderboard
  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
  • Actions
    • Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
    • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to kills[(Player number of (Owner of (Killing unit)))]
    • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
kills is an integer array variable
Player(integer A) means you select Player - Convert Player Index do player

Yeah .. that should do the job
 
Sometimes, in some cases its better to have a periotic event updating a leaderboard, if the map is extremly chaotic. This can ease a little burdan off the game, but leaderboards dont do much anyway. If your map is a hero arena, then the unit death is the way to go, but if your map is like castle fight, preschool wars, or Hero wars Exiled, then I would go with the periotic event.
 
Status
Not open for further replies.
Top