• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Leaderboard

Status
Not open for further replies.
Level 8
Joined
Aug 13, 2018
Messages
338
Hi again. I want to make a leaderboard like this picture:
sh.png
How I can make it?
 
  • Kills
    • Events
      • Unit - A unit Dies
    • Conditions
    • 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)))]
Just use something like this, of course make variables for things so it looks cleaner and is easily editable (same goes for the leaderboard trigger)
 
This seems more like a request than actual help.
  • Kills
    • Events
      • Unit - A unit Dies
    • Conditions
    • 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)))]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] Equal to 20
        • Then - Actions
          • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
        • Else - Actions
Don't know what you want to do with the other players but it should look something like this
 
I have a starnge problem: I do all that Danethebeast say but values in the leaderboard does't change. please help me.
No, you made an error copying the trigger into your map. Only other possibly is you created another leaderboard and now last created leaderboard doesn't refer to the board you think it does. Don't make multiple leaderboards, you can only have one shown at a time. Also use a variable instead of "last created X" type objects.

Please don't just say things don't work. Post the trigger or map file or demo map or screenshot of the object editor if relevant, etc.. If we can't see what you tried there's no real way we can help you.
 
This is one of my triggers:

Change ValueT
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set Kills[(Player number of (Owner of (Killing unit)))] = Kills[(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)))]

(I use a mode and kills to win choose system)
 
((Triggering unit) is A Hero) Equal to True
Triggering Unit here refers to the dying unit, not the unit that did the killing. Thus, the leaderboard only gets updated when uniit kills a hero, rather than when a hero kills anything . I think you want this to be: ((Killing unit) is A Hero) Equal to True

Please paste your triggers between [trigger][/trigger] tags when you post on this site. It makes them much easier to read.
 
Hi @matin45 , I shall call you the gray cat. Anyway I want to explain what is happening in leaderboards. Firstly, you said that the codes given by @DaneTheBeast don't work but you have coded it wrong. @Pyrogasm stated the correct mistake where your code should show that the Kill[Player number of Owner of Killing unit] +1 instead of Kill[Kill(Player number of Owner of Killing unit]] +1.
Next I want to check if you
add the player to the leader board, if you did then I don't know what is wrong. As long as you add the player to the leader board, it should show the values.
Lastly, you also need to
show leader board to all players, I believe it is hidden by default.
 
Last edited:
Status
Not open for further replies.
Back
Top