• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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?
 
Level 12
Joined
Dec 11, 2014
Messages
662
  • 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)
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
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
 
Level 39
Joined
Feb 27, 2007
Messages
5,012
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.
 
Level 8
Joined
Aug 13, 2018
Messages
338
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)
 
Level 39
Joined
Feb 27, 2007
Messages
5,012
((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.
 
Level 15
Joined
Aug 14, 2007
Messages
936
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.
Top