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

Multiboard.

Status
Not open for further replies.
Level 3
Joined
May 30, 2012
Messages
29
Almost all multiboards, shows scores "kills and deaths" for single players.

My map is 5 players in team +computer
that means
Team HUM (5 players + computer (player 6 colour orange)
Team UD (5 players + computer (player 12 colour Brown)

what i need is muliboard show scores of team complete, no single player.






  • MultiboardSetup
    • Events
      • Time - Elapsed game time is 61.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Game_Time as a One-shot timer that will expire in 999999.00 seconds
      • Trigger - Run CreateMultiboard <gen> (ignoring conditions)
  • CreateMultiboard
    • Events
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and (6 + PlayerCount) rows, titled MiniDota
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Team
      • 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
      • 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
      • 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
      • Set TempInterger = 2
      • Set MultiboardSpots[1] = TempInterger
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInterger to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInterger to 0
      • Set TempInterger = ((Number of players in PlayersHum) + 4)
      • Set MultiboardSpots[7] = TempInterger
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row TempInterger to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row TempInterger to 0
      • Set MultiboardClock = (PlayerCount + 6)
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row MultiboardClock to Game Time
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiboardClock to 0:00
      • 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)

  • TallyScore
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set ScoreSkills[(Player number of (Owner of (Killing unit)))] = (ScoreSkills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set ScoreDeaths[(Player number of (Owner of (Dying unit)))] = (ScoreDeaths[(Player number of (Owner of (Dying unit)))] + 1)

  • TallyClock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set GameMinutes = ((Integer((Elapsed time for Game_Time))) / 60)
      • Set GameSeconds = ((Integer((Elapsed time for Game_Time))) mod 60)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GameSeconds Greater than or equal to 10
        • Then - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiboardClock to ((String(GameMinutes)) + (: + (String(GameSeconds))))
        • Else - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiboardClock to ((String(GameMinutes)) + (:0 + (String(GameSeconds))))
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
What's the problem then? Just create a TeamScore integer for each team and do the sum of team members on each kill/deeath
 
add the players in team one to a team1 player group.
add the platers in team 2 to a team2 player group.

then make a unit dies event.
use an ITE to check if the killing unit is owned by someone in team1 group.
in the then block increase an integer for team1Kills
in the else block increase an integer for team2Kills
after each of those update the multiboard .
 
Level 3
Joined
May 30, 2012
Messages
29
Hi, check that.

The multiboard is finish. but how can i optimize "tally score".

Check

  • PlayerGroup
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in Player Group - Player 6 (Orange) and do (Actions)
        • Loop - Actions
          • Player Group - Add Player 1 (Red) to Player Group - Player 6 (Orange)
          • Player Group - Add Player 2 (Blue) to Player Group - Player 6 (Orange)
          • Player Group - Add Player 3 (Teal) to Player Group - Player 6 (Orange)
          • Player Group - Add Player 4 (Purple) to Player Group - Player 6 (Orange)
          • Player Group - Add Player 5 (Yellow) to Player Group - Player 6 (Orange)
          • Player Group - Add Player 6 (Orange) to Player Group - Player 6 (Orange)
      • Player Group - Pick every player in Player Group - Player 12 (Brown) and do (Actions)
        • Loop - Actions
          • Player Group - Add Player 7 (Green) to Player Group - Player 12 (Brown)
          • Player Group - Add Player 8 (Pink) to Player Group - Player 12 (Brown)
          • Player Group - Add Player 9 (Gray) to Player Group - Player 12 (Brown)
          • Player Group - Add Player 10 (Light Blue) to Player Group - Player 12 (Brown)
          • Player Group - Add Player 11 (Dark Green) to Player Group - Player 12 (Brown)
          • Player Group - Add Player 12 (Brown) to Player Group - Player 12 (Brown)

  • CreateMultiboard
    • Events
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and (6 + PlayerCount) rows, titled MiniDota
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Team
      • 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
      • 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
      • 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 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
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (Name of Player 6 (Orange))
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 2 to 10.00% of the total screen width
      • Multiboard - Set the color for (Last created multiboard) item in column 1, row 2 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to (Name of Player 12 (Brown))
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 3 to 10.00% of the total screen width
      • Multiboard - Set the color for (Last created multiboard) item in column 1, row 3 to (70.00%, 70.00%, 70.00%) with 0.00% transparency
      • Set TempInterger = 2
      • Set MultiboardSpots[6] = TempInterger
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to 0
      • Set TempInterger = ((Number of players in PlayersHum) + 4)
      • Set MultiboardSpots[12] = TempInterger
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to 0
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to 0
      • Set MultiboardClock = (PlayerCount + 6)
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row MultiboardClock to Game Time
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row MultiboardClock to 0:00
      • 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)





  • TallyScoreUD
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player Group - Player 12 (Brown)) Equal to True
        • Then - Actions
          • Set ScoreSkills[12] = (ScoreSkills[12] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to (<Empty String> + (String(ScoreSkills[12])))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Dying unit)) is in Player Group - Player 12 (Brown)) Equal to True
        • Then - Actions
          • Set ScoreDeaths[12] = (ScoreDeaths[12] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (<Empty String> + (String(ScoreDeaths[12])))
        • Else - Actions
          • Do nothing

  • TallyScoreHUM
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player Group - Player 6 (Orange)) Equal to True
        • Then - Actions
          • Set ScoreSkills[6] = (ScoreSkills[6] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (<Empty String> + (String(ScoreSkills[6])))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Dying unit)) is in Player Group - Player 6 (Orange)) Equal to True
        • Then - Actions
          • Set ScoreDeaths[6] = (ScoreDeaths[6] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (<Empty String> + (String(ScoreDeaths[6])))
        • Else - Actions
          • Do nothing
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Bad "Group add" thing.

For each integer A from 1 to 12 do - If Player Number of Player(Integer A) is less than or equal to 6 add it to Group A, else, add to Group B.

You're done. That will sort your players this way:

1, 2, 3, 4, 5, 6
7, 8, 9, 10, 11, 12.

Every time a hero dies, increase PlayerKills[Player number of (Killing Player)] +1, and PlayerDeaths[Player number of (Dying Player)] +1.

Code:
If Player Index of Killing Player <= 6 then
    set TeamAKills to +1 and TeamBDeaths to +1
else
    set TeamBKills to +1 and TeamADeaths to +1
endif

Update Multiboard (Only Team score row/column)
Update Multiboard (Only Killing Player row/column)
Update Multiboard (Only Dying Player row/column)
As long as you don't apply a Switch system, this will work perfectly.

Don't use "Do Nothing" action. Leave it blank Or add a comment if it helps you keep order of stuff.

Set "Last created multiboard" to a Multiboard variable and use the variable instead of the (last created multiboard) it's signifatively faster this way for you and for the system.
 
Level 3
Joined
May 30, 2012
Messages
29
Like this?

  • TallyScore
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set ScoreSkills[((Player number of (Owner of (Killing unit))) + 1)] = ScoreDeaths[(ScoreDeaths[(Player number of (Owner of (Dying unit)))] + 1)]
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (<Empty String> + (String(ScoreSkills[6])))
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (<Empty String> + (String(ScoreDeaths[6])))
      • For each (Integer B) from 7 to 12, do (Actions)
        • Loop - Actions
          • Set ScoreSkills[((Player number of (Owner of (Killing unit))) + 1)] = ScoreDeaths[(ScoreDeaths[(Player number of (Owner of (Dying unit)))] + 1)]
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to (<Empty String> + (String(ScoreSkills[12])))
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (<Empty String> + (String(ScoreDeaths[12])))
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Triggering Unit > Dying unit. Always use Triggering unit if you can. (Of course, Killing uNit is not the Triggering Unit in the "A unit dies" event. There's no way around for that).

You're not setting "Last Created Multiboard" to any variable. DO IT.
Set Multiboard = Last Created Multiboard
 
Status
Not open for further replies.
Top