Variable counting..

Söder

New Member
Reaction score
1
Hello i don't know how to make wc3 count the highest variable...
i have some triggers like this---

Event: Player 1 selects a unit
Condition: Unit type of (triggering unit) equals to sheep
Action: set count_sheep_1 to count_sheep_1 + 1

so now many players have this triggers and after the game i want wc3 to count which player that have selected the most sheeps.....
so how to do that?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
898
The easiest thing would probably be to put all players in a leaderboard with the value equal to their variable, then use the sort feature of the leaderboard, then get the player in the first position of the leaderboard.
 

Söder

New Member
Reaction score
1
can i have two leaderboards? because i already use one and that one i don't wanna loose..... this is a minigame in my game btw..
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,496
You can have as many as you want or need.
Only one of them can be on screen.
Remember to hide all boards you don't want to show, and show the real one last.
 
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