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

why arent my scoreboard working ?

Status
Not open for further replies.
Level 8
Joined
Aug 8, 2011
Messages
297
why arent my Multiboard/scoreboard working ?

ive copied it from the Dota Template 1.0.

But its not working, only showing a black screen with 0's at the top right corner. can someone see whats wrong with the triggers in the Multiboard triggers please.

and dont mind the Initially On is Off. its becouse im playing the map atm, and i dont want something in the map that does not work.
 

Attachments

  • Dota Footmen Frenzy 6.73.w3x
    2 MB · Views: 71
Level 5
Joined
Jan 12, 2010
Messages
132
Post triggers pls I dont have WE at my hands right now.
But you can make a simple scoreboard (leaderboard) with very few data,or you can make a complex scoreboard (multiboard) with very much data but depend on how much skilled are you.
So post triggers pls.
 
Level 8
Joined
Aug 8, 2011
Messages
297
its like 5 big triggers, its from the Dota Template 1.0 map, im just copying them to my map. Cant someone download my map and see what is wrong ?

and why dont people download the maps `?

but ok here you are:


  • Multiboard Setup
    • Events
      • Time - Elapsed game time is 16.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Game_Time as a One-shot timer that will expire in 999999.00 seconds
      • Leaderboard - Create a leaderboard for PlayersSentinel titled Sentinel
      • Set LeaderboardSentinel = (Last created leaderboard)
      • Leaderboard - Hide LeaderboardSentinel
      • Leaderboard - Create a leaderboard for PlayersScourge titled Scourge
      • Set LeaderboardScourge = (Last created leaderboard)
      • Leaderboard - Hide LeaderboardScourge
      • Player Group - Pick every player in PlayersSentinel and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to LeaderboardSentinel with label (Name of (Picked player)) and value 0
      • Player Group - Pick every player in PlayersScourge and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to LeaderboardScourge with label (Name of (Picked player)) and value 0
      • Trigger - Run Create Multiboard <gen> (ignoring conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multiboard_ShowDeaths Equal to True
        • Then - Actions
          • Trigger - Turn on Tally Deaths <gen>
        • Else - Actions
  • Create Multiboard
    • Events
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and (6 + PlayersCount) rows, titled Dota Template
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multiboard_ShowDeaths Equal to True
        • Then - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Dead
        • Else - Actions
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Kills
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Deaths
      • -------- Now set the fields for the first row, AND our player rows. --------
      • Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 10.00% of the total screen width
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multiboard_ShowDeaths Equal to True
        • Then - Actions
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 4.00% of the total screen width
        • Else - Actions
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 0.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 3.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 5.00% of the total screen width
      • Multiboard - Set the color for (Last created multiboard) item in column 2, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 3, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 4, row 0 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
      • -------- DEFINE PLAYERS ON THE BOARD --------
      • Trigger - Run Sort Multiboard <gen> (ignoring conditions)
      • -------- Sentinel Team --------
      • Set TempInteger = 2
      • Set Multiboard_Spots[1] = TempInteger
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row TempInteger to PlayerNames[1]
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row TempInteger to
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInteger to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInteger to 0
      • -------- Scourge Team --------
      • Set TempInteger = ((Number of players in PlayersSentinel) + 4)
      • Set Multiboard_Spots[7] = TempInteger
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row TempInteger to PlayerNames[7]
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row TempInteger to
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInteger to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInteger to 0
      • -------- Clock --------
      • Set Multiboard_Clock = (PlayersCount + 6)
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row Multiboard_Clock to Game Time:
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Clock to 0:00
      • Multiboard - Set the color for (Last created multiboard) item in column 2, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 3, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 4, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Multiboard - Show (Last created multiboard)
  • Tally Score
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • (Player number of (Owner of (Killing unit))) Greater than 0
      • (Player number of (Owner of (Killing unit))) Less than or equal to 12
    • Actions
      • Set Score_Kills[(Player number of (Owner of (Killing unit)))] = (Score_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Score_Deaths[(Player number of (Owner of (Dying unit)))] = (Score_Deaths[(Player number of (Owner of (Dying unit)))] + 1)
      • If (((Owner of (Dying unit)) is in PlayersSentinel) Equal to True) then do (Set Score_Deaths[1] = (Score_Deaths[1] + 1)) else do (Do nothing)
      • If (((Owner of (Dying unit)) is in PlayersScourge) Equal to True) then do (Set Score_Deaths[7] = (Score_Deaths[7] + 1)) else do (Do nothing)
      • Set TempInteger = (((Hero level of (Dying unit)) x 5) + 100)
      • Player - Add TempInteger to (Owner of (Killing unit)) Current gold
      • Game - Display to (All players) the text: (PlayerNames[(Player number of (Owner of (Killing unit)))] + ( has just pawned + (PlayerNames[(Player number of (Owner of (Dying unit)))] + ('s head for an extra + ((String(TempInteger)) + gold.)))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in PlayersSentinel) Equal to True
        • Then - Actions
          • Set Score_Kills[1] = (Score_Kills[1] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in PlayersScourge) Equal to True
        • Then - Actions
          • Set Score_Kills[7] = (Score_Kills[7] + 1)
        • Else - Actions
      • Trigger - Run Sort Multiboard <gen> (checking conditions)
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[1] to ( + (String(Score_Kills[1])))
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[7] to ( + (String(Score_Kills[7])))
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[1] to ( + (String(Score_Deaths[1])))
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[7] to ( + (String(Score_Deaths[7])))

  • Tally Clock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Game_Minutes = ((Integer((Elapsed time for Game_Time))) / 60)
      • Set Game_Seconds = ((Integer((Elapsed time for Game_Time))) mod 60)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Game_Seconds Greater than or equal to 10
        • Then - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Clock to ((String(Game_Minutes)) + (: + (String(Game_Seconds))))
        • Else - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Clock to ((String(Game_Minutes)) + (:0 + (String(Game_Seconds))))
  • Tally Deaths
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (RevivableHeroes is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in RevivableHeroes and do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row Multiboard_Spots[(Player number of (Owner of (Picked unit)))] to (String((Integer((Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))])))))
  • Sort Multiboard
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in PlayersSentinel and do (Actions)
        • Loop - Actions
          • Leaderboard - Change the value for (Picked player) in LeaderboardSentinel to ((Score_Kills[(Player number of (Picked player))] x 10000) - Score_Deaths[(Player number of (Picked player))])
      • Player Group - Pick every player in PlayersScourge and do (Actions)
        • Loop - Actions
          • Leaderboard - Change the value for (Picked player) in LeaderboardScourge to ((Score_Kills[(Player number of (Picked player))] x 10000) - Score_Deaths[(Player number of (Picked player))])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Sort_Board_By_Kills Equal to True
        • Then - Actions
          • Leaderboard - Sort LeaderboardSentinel by Value in Descending order
          • Leaderboard - Sort LeaderboardScourge by Value in Descending order
        • Else - Actions
          • Leaderboard - Sort LeaderboardSentinel by Player in Ascending order
          • Leaderboard - Sort LeaderboardScourge by Player in Ascending order
      • Set TempInteger = 2
      • Player Group - Pick every player in PlayersSentinel and do (Actions)
        • Loop - Actions
          • Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardSentinel) + TempInteger)
      • Set TempInteger = ((Number of players in PlayersSentinel) + 4)
      • Player Group - Pick every player in PlayersScourge and do (Actions)
        • Loop - Actions
          • Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardScourge) + TempInteger)
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Set TempInteger = (Player number of (Picked player))
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row Multiboard_Spots[TempInteger] to PlayerNames[TempInteger]
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row Multiboard_Spots[TempInteger] to
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[TempInteger] to ( + (String(Score_Kills[TempInteger])))
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[TempInteger] to ( + (String(Score_Deaths[TempInteger])))

can you see whats wrong ? this is the triggers i have imported from Dota Template 1.0 map.
 
Last edited:
Level 5
Joined
Jan 12, 2010
Messages
132
First of all this template is so sux,you can do it a few lines of code is long and useless.
Second your trigger that is supossed to create your multiboard isnt fired up has no event and I cant see a line in your triggers that call that trigger.
And another think in your post you can also tell what you desire from your multiboard to do.
I will do it for you if you tell me.

BTW: I dont dwl maps cuz I`m to lazzy.
This is my multiboard that I used on my td map is a long code cuz it has many functions to show.
  • Mboard
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 5 columns and ((Number of players in Player_group) + 4) rows, titled Multiboard
      • Set M_board = (Last created multiboard)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Hide text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Hide text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 5, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 1.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 1.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 11.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 5, row (Integer A) to 3.50% of the total screen width
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Current lvl:
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Next level:
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Game time:
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Show text and Hide icons
      • Multiboard - Set the color for (Last created multiboard) item in column 4, row 1 to (5.00%, 5.00%, 90.00%) with 0.00% transparency
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 3 to Show text and Hide icons
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 3 to 11.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row 3 to 1.00% of the total screen width
      • Multiboard - Set the color for (Last created multiboard) item in column 2, row 3 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 3, row 3 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 4, row 3 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Multiboard - Set the color for (Last created multiboard) item in column 4, row 2 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column (Integer A), row 4 to Hide text and Show icons
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 4 to 12.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 4 to 3.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 4 to 3.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 4 to 3.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row 4 to 3.50% of the total screen width
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNAcolyte.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 2, row 4 to ReplaceableTextures\CommandButtons\BTNSnazzyPotion.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 3, row 4 to ReplaceableTextures\CommandButtons\BTNGreenSkillz.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 4, row 4 to ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 5, row 4 to ReplaceableTextures\CommandButtons\BTNHumanCaptureFlag.blp
      • For each (Integer A) from 5 to ((Number of players in Player_group) + 4), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 5, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 12.50% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 3.50% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 3.50% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 3.50% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 5, row (Integer A) to 3.50% of the total screen width
      • Set Temp_integer[1] = 0
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
              • ((Player((Integer A))) controller) Equal to User
            • Then - Actions
              • Set Temp_integer[1] = (Temp_integer[1] + 1)
              • Set M_row[(Integer A)] = (Temp_integer[1] + 4)
              • Player - Set name of (Player((Integer A))) to (P_color[(Integer A)] + (P_name[(Integer A)] + P_r))
              • Multiboard - Set the text for (Last created multiboard) item in column 1, row M_row[(Integer A)] to (Name of (Player((Integer A))))
            • Else - Actions
      • Multiboard - Show (Last created multiboard)
      • Multiboard - Minimize (Last created multiboard)
  • Mupdate
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • 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
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row M_row[(Integer A)] to (|cffFF00FF + ((String(Lives[(Integer A)])) + |r))
              • Set Temp_group = (Units in (Entire map) matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to True)) and ((Owner of (Matching unit)) Equal to (Player((Integer A))))))
              • Multiboard - Set the text for (Last created multiboard) item in column 3, row M_row[(Integer A)] to (|cff4CC417 + ((String(((Number of units in Temp_group) - 1))) + |r))
              • Multiboard - Set the text for (Last created multiboard) item in column 4, row M_row[(Integer A)] to (|cffFDD017 + ((String(((Player((Integer A))) Current gold))) + |r))
              • Multiboard - Set the text for (Last created multiboard) item in column 5, row M_row[(Integer A)] to (|cff306EFF + ((String(Race_player[(Integer A)])) + |r))
              • Custom script: call DestroyGroup(udg_Temp_group)
            • Else - Actions
 
Level 5
Joined
Jan 12, 2010
Messages
132
I can do something much more beautiful then that if you give me a rep+.

Download test map


  • Multiboard
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set Temp_integer = 1
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • 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
              • Player Group - Add (Player((Integer A))) to Player_group
              • Set Temp_integer = (Temp_integer + 1)
              • Set M_row[(Integer A)] = Temp_integer
            • Else - Actions
      • Multiboard - Create a multiboard with 3 columns and ((Number of players in Player_group) + 1) rows, titled Scoreboard
      • For each (Integer A) from 1 to ((Number of players in Player_group) + 1), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 15.00% of the total screen width
      • For each (Integer A) from 2 to 3, do (Actions)
        • Loop - Actions
          • Set Temp_integer = (Integer A)
          • For each (Integer B) from 1 to ((Number of players in Player_group) + 1), do (Actions)
            • Loop - Actions
              • Multiboard - Set the display style for (Last created multiboard) item in column Temp_integer, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the width for (Last created multiboard) item in column Temp_integer, row (Integer B) to 7.00% of the total screen width
              • Multiboard - Set the text for (Last created multiboard) item in column Temp_integer, row (Integer B) to (String(0))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column (Integer A), row 1 to Show text and Show icons
          • Multiboard - Set the color for (Last created multiboard) item in column (Integer A), row 1 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player name
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to CK
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to HK
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNAcolyte.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to ReplaceableTextures\CommandButtons\BTNAbomination.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNSpiritOfVengeance.blp
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • 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
              • Multiboard - Set the text for (Last created multiboard) item in column 1, row M_row[(Integer A)] to (Name of (Player((Integer A))))
            • Else - Actions
      • Multiboard - Show (Last created multiboard)
  • Multiboard update
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set HK[(Player number of (Owner of (Killing unit)))] = (HK[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row M_row[(Player number of (Owner of (Killing unit)))] to (String(HK[(Player number of (Owner of (Killing unit)))]))
        • Else - Actions
          • Set CK[(Player number of (Owner of (Killing unit)))] = (CK[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row M_row[(Player number of (Owner of (Killing unit)))] to (String(CK[(Player number of (Owner of (Killing unit)))]))
 
Last edited:
Multiboard update trigger is really poor, it will count killing enemy hero ILLUSIONS as killing heroes or killing buildings like killing units. Elapsed game time is 0.00 sec will do just fine.
Use variable instead LastCreatedMultiboard because it's just another function call, in your case around 40 unneeded function calls if all players play.
JASS:
function GetLastCreatedMultiboard takes nothing returns multiboard
    return bj_lastCreatedMultiboard
endfunction
You can use boolean array and set it to true in first loop where you check these coonditions:
  • ((Player((Integer A))) controller) Equal to User
  • ((Player((Integer A))) slot status) Equal to Is playing
Then just in 2nd one you save yourself or should I say code for calling same but new created functions 24 times and just see is B[Integer A] = true.

And that would be all, more or less, you see, 2 variables reduced number of function calls by 50 :)
 
JASS:
struct Score extends array

    static multiboard     MB
    static multiboarditem MB_ITEM
    
    static integer        MB_COLUM_COUNT    = 4              //Player Name | H Kills | C Kills | C Denies
    static integer        MB_ROW_COUNT      = 1              //We will edit this value in method below, it's value will be equal to number of playing players + 1 for info
    static string         MB_TITLE          = "Scoreboard"   //Multiboard Name
    
    static integer array  PLAYER_ROW  
    static integer array  PLAYER_ID 
    static boolean array  B

    static method editField takes integer row, integer col, string s returns nothing
        set MB_ITEM = MultiboardGetItem(MB, row, col)
        call MultiboardSetItemValue(MB_ITEM, s)
        call MultiboardReleaseItem(MB_ITEM)
        set MB_ITEM = null
    endmethod
    
    private static method runSetup takes nothing returns nothing
        /* Basic Scripting DO NOT EDIT if you don't understand */
        local integer i = 0
        loop
            exitwhen i>11
            if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
                set PLAYER_ID[i] = GetPlayerId(Player(i))
                set PLAYER_ROW[PLAYER_ID[i]] = MB_ROW_COUNT
                set MB_ROW_COUNT = MB_ROW_COUNT + 1
                set B[i] = true
            endif
            set i=i+1
        endloop
        set MB = CreateMultiboard()
        call MultiboardSetRowCount(MB, MB_ROW_COUNT)
        call MultiboardSetColumnCount(MB, MB_COLUM_COUNT)
        call MultiboardSetTitleText(MB, MB_TITLE)
        call MultiboardSetItemsStyle(MB, true, false)
        /* End Basic Scripting DO NOT EDIT if you don't understand */
        
        /* Column Dimenisions */
        set i = 0
        loop
            exitwhen i>MB_ROW_COUNT
                call MultiboardSetItemWidth(MultiboardGetItem(MB, i, 0), 0.07)
                call MultiboardSetItemWidth(MultiboardGetItem(MB, i, 1), 0.05)
                call MultiboardSetItemWidth(MultiboardGetItem(MB, i, 2), 0.05)
                call MultiboardSetItemWidth(MultiboardGetItem(MB, i, 3), 0.05)
            set i=i+1
        endloop
        /* End Column Dimenisions */
        
        /* 1st Column Options */
        call MultiboardSetItemStyle(MultiboardGetItem(MB, 0, 0), true, true)
        call MultiboardSetItemIcon(MultiboardGetItem(MB, 0, 0), "ReplaceableTextures\\PassiveButtons\\PASBTNStatUp.blp")
        call thistype.editField(0, 0, "|c00FEBA0EPlayer:")
        /* End 1st Column Options */
        
        /* 2nd Column Options */
        call MultiboardSetItemStyle(MultiboardGetItem(MB, 0, 1), true, true)
        call MultiboardSetItemIcon(MultiboardGetItem(MB, 0, 1), "ReplaceableTextures\\PassiveButtons\\PASBTNIncinerate.blp")
        call thistype.editField(0, 1, "|c00FEBA0EH Kills:")
        /* End 2nd Column Options */
        
        /* 3rd Column Options */
        call MultiboardSetItemStyle(MultiboardGetItem(MB, 0, 2), true, true)
        call MultiboardSetItemIcon(MultiboardGetItem(MB, 0, 2), "ReplaceableTextures\\PassiveButtons\\PASBTNGnollCommandAura.blp")
        call thistype.editField(0, 2, "|c00FEBA0EC Kills:")
        /* End 3rd Column Options */
        
        /* 4th Column Options */
        call MultiboardSetItemStyle(MultiboardGetItem(MB, 0, 3), true, true)
        call MultiboardSetItemIcon(MultiboardGetItem(MB, 0, 3), "ReplaceableTextures\\PassiveButtons\\PASBTNReincarnation.blp")
        call thistype.editField(0, 3, "|c00FEBA0EC Denies:")
        /* End 4th Column Options */
        
        /* Field Starting Values */
        set i = 0
        loop
            exitwhen i>11
            if B[i] then
                call thistype.editField(PLAYER_ROW[PLAYER_ID[i]], 0, GetPlayerName(Player(i)))
                call thistype.editField(PLAYER_ROW[PLAYER_ID[i]], 1, I2S(0))
                call thistype.editField(PLAYER_ROW[PLAYER_ID[i]], 2, I2S(0))
                call thistype.editField(PLAYER_ROW[PLAYER_ID[i]], 3, I2S(0))
            endif
            set i=i+1
        endloop
        /* End Field Starting Values */
        
        call MultiboardDisplay(MB, true)
    endmethod

    private static method onInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterTimerEvent(t, 0., false)
        call TriggerAddAction( t, function thistype.runSetup )
    endmethod

endstruct
  • Score Update
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Killing unit)) slot status) Equal to Is playing
    • Actions
      • Custom script: local effect sfx
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) is an illusion) Equal to False
        • Then - Actions
          • Set PLAYER_ID = (Player number of (Owner of (Killing unit)))
          • Set HERO_KILLS[PLAYER_ID] = (HERO_KILLS[PLAYER_ID] + 1)
          • Custom script: call Score.editField( Score.PLAYER_ROW[ udg_PLAYER_ID - 1 ] , 1 , I2S( udg_HERO_KILLS[ udg_PLAYER_ID ] ) )
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Owner of (Killing unit))
            • Then - Actions
              • Set PLAYER_ID = (Player number of (Owner of (Triggering unit)))
              • Set CREEP_DENIES[PLAYER_ID] = (CREEP_DENIES[PLAYER_ID] + 1)
              • Custom script: call Score.editField( Score.PLAYER_ROW[ udg_PLAYER_ID - 1 ] , 3 , I2S( udg_CREEP_DENIES[ udg_PLAYER_ID ] ) )
              • Custom script: set sfx = AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl", GetTriggerUnit(), "overhead")
              • Wait 0.00 seconds
              • Custom script: call DestroyEffect( sfx )
              • Custom script: set sfx = null
            • Else - Actions
              • Set PLAYER_ID = (Player number of (Owner of (Killing unit)))
              • Set CREEP_KILLS[PLAYER_ID] = (CREEP_KILLS[PLAYER_ID] + 1)
              • Custom script: call Score.editField( Score.PLAYER_ROW[ udg_PLAYER_ID - 1 ] , 2 , I2S( udg_CREEP_KILLS[ udg_PLAYER_ID ] ) )
There you go, I tried to make it understandable, if you need help feel free to ask.

EDIT:

I added simple deny special effect as well.
 

Attachments

  • TestMap.w3x
    20.4 KB · Views: 78
  • TestMap 1.1.w3x
    21 KB · Views: 55
Level 8
Joined
Aug 8, 2011
Messages
297
how do i add Jass codes ?

i just tried to import both trigger and jass, but it said error and disabled trigger and jass code.

and i cant start the map your given me, it just go to warcraft 3 start menu when i press "Test Map"

could you implent the trigger for me ?
 

Attachments

  • Dota Footmen Frenzy 6.93.w3x
    2 MB · Views: 558
Last edited:
Dude I improved code even more, it now shows structures destroyed as well.
http://www.hiveworkshop.com/forums/...456/how-download-install-confige-jngp-160547/

You must setup your Jass New Gen, it won't work otherwise.
Btw some of your triggers are broken and some are horrible coded.

Map loading time is 5 times longer than it should be, mostly because of many things set to fire on map initialization, elepsed game time 0.00 can solve some problems.
 

Attachments

  • 1.JPG
    1.JPG
    128.6 KB · Views: 67
  • Dota Footmen Frenzy 6.93.w3x
    2 MB · Views: 505
Level 8
Joined
Aug 8, 2011
Messages
297
im not sure i got the newest version of New Gen Editor... can you tell me in simple steps how i do it ?

it still comes with errors when i try to save the map in the new gen editor.... do you have a full/updated version of new gen that you can send me ?
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
stimm the wc3 version doesn't particularly matter. You do need a WorldEdit121.exe, but that should be available without too much trouble. It's been a long time since I messed with installing JNGP lol

I'm using 1.26 (newest) and as long as I have WorldEdit121.exe I'm good to go.
 
Status
Not open for further replies.
Top