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

team leaderboard..

Status
Not open for further replies.
Level 4
Joined
Jul 31, 2012
Messages
63
i wanted to make a leaderboard just as the same as the leaderboard on dota...
can anyone tell me how to do it.. or kindly post the trigger here.. thanks..
 
Level 10
Joined
Dec 17, 2011
Messages
355
Level 4
Joined
Jul 31, 2012
Messages
63
i wanted a leaderboard with the list of KILLS and DEAths by team..

example:
Kills Deaths
team 1
player 1 2 0
player 2 3 2
player 3 4 5
player 4 1 2
player 5 5 0
player 6 3 2
team 2
player 7 2 4
player 8 0 2
player 9 0 3
player 10 7 3
player 11 1 5
player 12 1 1

team 1 18
team 2 11

something like this..
@spartipilo
scoreboard during game time.. :D
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Edit:
OOPS... Now I noticed you're using Players 1-6, and 7-12 for teams. (6 players per team). I didn't do it that way, but like Dota does (player 2-6, and 8-12, each team with 5 players). I Hope you find the way to modify the system to fit your needs xD
/Edit

It's similar to Dota's multiboard; the thing is they use some more complex systems for Gold, Icons, Assistances, Cooldowns, and each player owns a multiboard with an specific title wich displays the Revive time of allies and enemies.

This only displays Kills and Deaths and arranges the Multiboard according to players the same way Dota does.

This sets the color, it can be done in GUI, but I did in JASS because it's faster. It's done on Map Initialization
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    set udg_PlayerColor[1] = "|CFFFF0303" // Red (The Sentinel)
    set udg_PlayerColor[2] = "|CFF0042FF" // Blue
    set udg_PlayerColor[3] = "|CFF1CB619" // Teal
    set udg_PlayerColor[4] = "|CFF540081" // Purple
    set udg_PlayerColor[5] = "|CFFFFFF01" // Yellow
    set udg_PlayerColor[6] = "|CFFFE8A0E" // Orange
    set udg_PlayerColor[7] = "|CFF20C000" // Green (The Scourge)
    set udg_PlayerColor[8] = "|CFFE55BB0" // Pink
    set udg_PlayerColor[9] = "|CFF959697" // Gray
    set udg_PlayerColor[10] = "|CFF7EBFF1" // Light Blue
    set udg_PlayerColor[11] = "|CFF106246" //Dark Green
    set udg_PlayerColor[12] = "|CFF4E2A04" // Brown
endfunction

//===========================================================================
function InitTrig_Map_Initialization takes nothing returns nothing
    set gg_trg_Map_Initialization = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Map_Initialization, function Trig_Untitled_Trigger_001_Actions )
endfunction

This one creates the Multiboard
  • Multiboard Create
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Arrange Players --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Player = (Picked player)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player controller) Equal to User
              • (Player slot status) Equal to Is playing
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player number of Player) Less than or equal to 6
                • Then - Actions
                  • Player Group - Add Player to TheSentinel
                • Else - Actions
                  • Player Group - Add Player to TheScourge
            • Else - Actions
      • -------- --------
      • -------- Creating Multiboard --------
      • Multiboard - Create a multiboard with 3 columns and 13 rows, titled Score Board
      • Set SB = (Last created multiboard)
      • Multiboard - Set the display style for SB item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the color for SB item in column 2, row 0 to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Multiboard - Set the color for SB item in column 3, row 0 to (0.00%, 0.00%, 100.00%) with 0.00% transparency
      • Multiboard - Set the width for SB item in column 1, row 0 to 9.00% of the total screen width
      • Multiboard - Set the width for SB item in column 2, row 0 to 2.00% of the total screen width
      • Multiboard - Set the width for SB item in column 3, row 0 to 2.00% of the total screen width
      • -------- --------
      • -------- Saving 0 on Kills and Deaths --------
      • Multiboard - Set the text for SB item in column 2, row 0 to 0
      • Multiboard - Set the text for SB item in column 3, row 0 to 0
      • -------- --------
      • Set RowCount = (RowCount + 1)
      • -------- --------
      • -------- Setting the K of Kills on Row-1 / Col-2 --------
      • Multiboard - Set the text for SB item in column 2, row 1 to K
      • -------- --------
      • -------- Setting the D of Deaths on Row-1 / Col-3 --------
      • Multiboard - Set the text for SB item in column 3, row 1 to D
      • -------- --------
      • Set RowCount = (RowCount + 1)
      • Set SentinelRow = RowCount
      • -------- --------
      • -------- Setting the "The Sentinel" on Row-2 / Col-1 --------
      • Multiboard - Set the text for SB item in column 1, row RowCount to (PlayerColor[1] + (The Sentinel + |r))
      • -------- --------
      • -------- Setting The Sentinel Player Names --------
      • Player Group - Pick every player in TheSentinel and do (Actions)
        • Loop - Actions
          • Set RowCount = (RowCount + 1)
          • Set Player = (Picked player)
          • Set Integer = (Player number of Player)
          • Multiboard - Set the text for SB item in column 1, row RowCount to (PlayerColor[Integer] + ((Name of Player) + |r))
          • -------- --------
          • -------- The following will allow us to know what's the row of the Player in the Multiboard. --------
          • Set PlayerRow[Integer] = RowCount
      • -------- --------
      • Set RowCount = (RowCount + 1)
      • Set ScourgeRow = RowCount
      • -------- --------
      • -------- Setting The Scourge Player Names --------
      • Multiboard - Set the text for SB item in column 1, row RowCount to (PlayerColor[7] + (The Scourge + |r))
      • Player Group - Pick every player in TheScourge and do (Actions)
        • Loop - Actions
          • Set RowCount = (RowCount + 1)
          • Set Player = (Picked player)
          • Set Integer = (Player number of Player)
          • Multiboard - Set the text for SB item in column 1, row RowCount to (PlayerColor[Integer] + ((Name of Player) + |r))
          • -------- --------
          • -------- The following will allow us to know what's the row of the Player in the Multiboard. --------
          • Set PlayerRow[Integer] = RowCount
      • -------- --------
      • -------- Ending the Multiboard --------
      • Multiboard - Change the number of rows for SB to RowCount
This one Updates the Multiboard when a hero dies
  • Score Update
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Killing unit) belongs to an enemy of (Triggering player)) Equal to True
    • Actions
      • Set Player = (Owner of (Killing unit))
      • Set Integer = (Player number of Player)
      • Set PlayerKills[Integer] = (PlayerKills[Integer] + 1)
      • Multiboard - Set the text for SB item in column 2, row PlayerRow[Integer] to (String(PlayerKills[Integer]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player is in TheSentinel) Equal to True
        • Then - Actions
          • Set SentinelKills = (SentinelKills + 1)
          • Multiboard - Set the text for SB item in column 2, row SentinelRow to (String(SentinelKills))
          • Set ScourgeDeaths = (ScourgeDeaths + 1)
          • Multiboard - Set the text for SB item in column 3, row ScourgeRow to (String(ScourgeDeaths))
        • Else - Actions
          • Set ScourgeKills = (ScourgeKills + 1)
          • Multiboard - Set the text for SB item in column 2, row ScourgeRow to (String(ScourgeKills))
          • Set SentinelDeaths = (SentinelDeaths + 1)
          • Multiboard - Set the text for SB item in column 3, row SentinelRow to (String(SentinelDeaths))
      • Set Player = (Triggering player)
      • Set Integer = (Player number of Player)
      • Set PlayerDeaths[Integer] = (PlayerDeaths[Integer] + 1)
      • Multiboard - Set the text for SB item in column 3, row PlayerRow[Integer] to (String(PlayerDeaths[Integer]))
And here's the Test map. Since only Users are added to teams, the computer Index for all the variables is 0, and Updating Row 0 means updating all the rows. If you kill the enemy hero you'll see all the Death Rows update to +1. If you test with another user it will work correctly.
 

Attachments

  • Dota Multiboard.w3x
    21 KB · Views: 94
Level 4
Joined
Jul 31, 2012
Messages
63
sir i think there`s something wrong on the trigger..

when i tried to test the map that you attach here
at first
it was something like this.

2.jpg

and when i got killed by the enemy
it will change to this..

3.jpg

but when i was the one who made the kill
it turns out to this..

1.jpg


and by the way sir..
i already change it to 10 players only :D
 

Attachments

  • 4.jpg
    4.jpg
    10.3 KB · Views: 125
Level 20
Joined
Jul 14, 2011
Messages
3,213
Since only Users are added to teams, the computer Index for all the variables is 0, and Updating Row 0 means updating all the rows. If you kill the enemy hero you'll see all the Death Rows update to +1. If you test with another user it will work correctly.

Each player has a row. Computers aren't players, so their row is 0 by default. When you modify a Row 0 on Multiboard, that's applied to all the rows of that column; so, the kills/deaths are increased by 1, but since the row is 0, the same value goes for all the other rows.

Test with someone else and you'll see it works.

You could, alternatively, remove the condition
  • ((Killing unit) belongs to an enemy of (Triggering player)) Equal to True
And kill yourself to see your kills (and deaths) increase by 1
 
Status
Not open for further replies.
Top