Multiboard Issue

Kelv

TH.net Regular
Reaction score
7
My multiboard has a glitch where when random units get killed. The hero revive timer gets messed up. Heres the map. Its unprotected. If you start the game, and choose a hero, then just let yourself die and watch the multiboard timer when the tower gets a kill.

If anyone can figure it out, please reply
 

Flare

Stops copies me!
Reaction score
662
post the triggers instead of the map

We here at TH.net are not a Warcraft III editing service. Do not expect for you to hand over your map to us and have it handed back magically complete. It won't happen. So don't try.
(quoted from the rules)

In the trigger that starts the timer, did you add a condition to check that the dying unit was a hero?
 

Kelv

TH.net Regular
Reaction score
7
Player Colors
Code:
Player Colors
    Events
        Map initialization
    Conditions
    Actions
        Set Player_Colors[1] = |c00ff0303
        Set Player_Colors[2] = |c00ff0303
        Set Player_Colors[3] = |c00ff0303
        Set Player_Colors[4] = |c00ff0303
        Set Player_Colors[5] = |c00ff0303
        Set Player_Colors[6] = |c00ff8000
        Set Player_Colors[7] = |c00ff8000
        Set Player_Colors[8] = |c00ff8000
        Set Player_Colors[9] = |c00ff8000
        Set Player_Colors[10] = |c00ff8000
        Set Player_Colors[11] = |c004e2a04
        Set Player_Colors[12] = |c004e2a04
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set PlayerNames[(Integer A)] = ((Player_Colors[(Integer A)] + (Name of (Player((Integer A))))) + |r)
Setup Players
Code:
Setup Players
    Events
        Map initialization
    Conditions
    Actions
        -------- All players --------
        Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Set LastHeroStanding = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Set PlayersCount = (Number of players in Players)
        Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to Player_Starting_Gold
                Player - Set (Picked player) Food cap to 5
        -------- Alliance --------
        Set PlayersAlliance = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersAlliance
        Set PlayersAllianceCount = (Number of players in PlayersAlliance)
        Set PlayersAllianceReverse = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersAllianceReverse
        Set PlayersAlliancePlaying = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersAlliancePlaying
        -------- Horde --------
        Set PlayersHorde = (All allies of Player 6 (Orange))
        Player Group - Remove Player 6 (Orange) from PlayersHorde
        Set PlayersHordeCount = (Number of players in PlayersHorde)
        Set PlayersHordeReverse = (All allies of Player 6 (Orange))
        Player Group - Remove Player 6 (Orange) from PlayersHordeReverse
        Set PlayersHordePlaying = (All allies of Player 6 (Orange))
        Player Group - Remove Player 6 (Orange) from PlayersHordePlaying
        -------- General --------
        Player - Turn Gives bounty On for Player 12 (Brown)
Multiboard Setup
Code:
Multiboard Setup
    Events
        Time - Elapsed game time is 5.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 PlayersAlliance titled Alliance
        Set LeaderboardAlliance = (Last created leaderboard)
        Leaderboard - Hide LeaderboardAlliance
        Leaderboard - Create a leaderboard for PlayersHorde titled Horde
        Set LeaderboardHorde = (Last created leaderboard)
        Leaderboard - Hide LeaderboardHorde
        Player Group - Pick every player in PlayersAlliance and do (Actions)
            Loop - Actions
                Leaderboard - Add (Picked player) to LeaderboardAlliance with label (Name of (Picked player)) and value 0
        Player Group - Pick every player in PlayersHorde and do (Actions)
            Loop - Actions
                Leaderboard - Add (Picked player) to LeaderboardHorde with label (Name of (Picked player)) and value 0
        Trigger - Run Create Multiboard <gen> (ignoring conditions)
        Trigger - Turn on Tally Deaths <gen>
Create Multiboard
Code:
Create Multiboard
    Events
    Conditions
    Actions
        Multiboard - Create a multiboard with 4 columns and (6 + PlayersCount) rows, titled Multiboard
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
        Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Dead
        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
        Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 4.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
        -------- DEFINE PLAYERS ON THE BOARD --------
        Trigger - Run Sort Multiboard <gen> (ignoring conditions)
        -------- Alliance --------
        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
        -------- Horde --------
        Set TempInteger = ((Number of players in PlayersAlliance) + 4)
        Set Multiboard_Spots[6] = TempInteger
        Multiboard - Set the text for (Last created multiboard) item in column 1, row TempInteger to PlayerNames[6]
        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
Code:
Tally Score
    Events
        Unit - A unit Dies
    Conditions
        (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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Dying unit)) is in PlayersAlliance) Equal to True
                (Unit-type of (Dying unit)) Not equal to Prospector
            Then - Actions
                Set Score_Deaths[1] = (Score_Deaths[1] + 1)
            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 PlayersHorde) Equal to True
                (Unit-type of (Dying unit)) Not equal to Explorer
            Then - Actions
                Set Score_Deaths[6] = (Score_Deaths[6] + 1)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Killing unit)) is in PlayersAlliance) Equal to True
                (Unit-type of (Dying unit)) Not equal to Prospector
            Then - Actions
                Set Score_Kills[1] = (Score_Kills[1] + 1)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Killing unit)) is in PlayersHorde) Equal to True
                (Unit-type of (Dying unit)) Not equal to Explorer
            Then - Actions
                Set Score_Kills[6] = (Score_Kills[6] + 1)
            Else - Actions
                Do nothing
        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[6] to (  + (String(Score_Kills[6])))
        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[6] to (   + (String(Score_Deaths[6])))
Tally Clock
Code:
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))))
Sort Multiboard
Code:
Sort Multiboard
    Events
    Conditions
    Actions
        Player Group - Pick every player in PlayersAlliance and do (Actions)
            Loop - Actions
                Leaderboard - Change the value for (Picked player) in LeaderboardAlliance to ((Score_Kills[(Player number of (Picked player))] x 10000) - Score_Deaths[(Player number of (Picked player))])
        Player Group - Pick every player in PlayersHorde and do (Actions)
            Loop - Actions
                Leaderboard - Change the value for (Picked player) in LeaderboardHorde 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 LeaderboardAlliance by Value in Descending order
                Leaderboard - Sort LeaderboardHorde by Value in Descending order
            Else - Actions
                Leaderboard - Sort LeaderboardAlliance by Player in Ascending order
                Leaderboard - Sort LeaderboardHorde by Player in Ascending order
        Set TempInteger = 2
        Player Group - Pick every player in PlayersAlliance and do (Actions)
            Loop - Actions
                Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardAlliance) + TempInteger)
        Set TempInteger = ((Number of players in PlayersAlliance) + 4)
        Player Group - Pick every player in PlayersHorde and do (Actions)
            Loop - Actions
                Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardHorde) + TempInteger)
        Set TempInteger = ((Number of players in PlayersHorde) + ((Number of players in PlayersHorde) + 4))
        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])))
Tally Deaths
Code:
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)))])))))
Manual Select
Code:
Manual Select
    Events
        Unit - A unit Sells a unit
    Conditions
        ((Sold unit) is A Hero) Equal to True
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Sold unit))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to False
                    Then - Actions
                        Unit - Remove (Picked unit) from the game
                        Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Move (Sold unit) instantly to (Position of (Picked unit))
                        Neutral Building - Remove (Unit-type of (Sold unit)) from all marketplaces
                    Else - Actions
                        Do nothing
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
                Special Effect - Create a special effect at (Position of (Sold unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                Special Effect - Destroy (Last created special effect)
        Game - Display to (All players) the text: ((Name of (Owner of (Sold unit))) + ( has chosen:  + (Name of (Sold unit))))
        Item - Create Replenishment at (Center of (Playable map area))
        Hero - Give (Last created item) to (Sold unit)
        Selection - Select (Sold unit) for (Owner of (Sold unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Sold unit)) is an ally of Player 1 (Red)) Equal to True
            Then - Actions
                Unit Group - Add (Sold unit) to Ally_Heroes
            Else - Actions
                Unit Group - Add (Sold unit) to Horde_Heroes
Revive Hero
Code:
Revive Hero
    Events
        Unit - A unit Dies
    Conditions
        (((Dying unit) is in Ally_Heroes) Equal to True) or (((Dying unit) is in Horde_Heroes) Equal to True)
    Actions
        Unit Group - Add (Dying unit) to RevivableHeroes
        Set TempReal = (((Real((Hero level of (Dying unit)))) x 5.00) + 5.00)
        Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
Revive Hero Timer
Code:
Revive Hero Timer
    Events
        Time - ReviveTimers[1] expires
        Time - ReviveTimers[2] expires
        Time - ReviveTimers[3] expires
        Time - ReviveTimers[4] expires
        Time - ReviveTimers[5] expires
        Time - ReviveTimers[6] expires
        Time - ReviveTimers[7] expires
        Time - ReviveTimers[8] expires
        Time - ReviveTimers[9] expires
        Time - ReviveTimers[10] expires
    Conditions
    Actions
        Unit Group - Pick every unit in RevivableHeroes and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Owner of (Picked unit)) is in PlayersAlliance) Equal to True
                            Then - Actions
                                Hero - Instantly revive (Picked unit) at (Position of Human Encampment 0000 <gen>), Show revival graphics
                            Else - Actions
                                Hero - Instantly revive (Picked unit) at (Position of Great Hall 0027 <gen>), Show revival graphics
                    Else - Actions
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
It's better. You should almost always post the problematic triggers before your map.
 

Kelv

TH.net Regular
Reaction score
7
I posted all the triggers, I also posted the map. Its only 75kb, I stripped the map of everything besides for the multiboard and triggers that are used to test for the multiboard glitch.

Fixed the Problem on my own, I guess everyone was too scared to download my map :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top