-
MBCreate
-

Events
-

Conditions
-

Actions
-


Multiboard - Create a multiboard with 5 columns and (MB_PLAYER_COUNT_ALL + 6) rows, titled MB_NAME
-


Set MB[1] = (Last created multiboard)
-


Multiboard - Create a multiboard with 5 columns and (MB_PLAYER_COUNT_ALL + 6) rows, titled MB_NAME
-


Set MB[2] = (Last created multiboard)
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




Multiboard - Hide MB[(Integer A)]
-




Multiboard - Set the width for MB[(Integer A)] item in column 1, row 0 to 7.00% of the total screen width
-




Multiboard - Set the width for MB[(Integer A)] item in column 2, row 0 to 3.00% of the total screen width
-




Multiboard - Set the width for MB[(Integer A)] item in column 3, row 0 to 3.00% of the total screen width
-




Multiboard - Set the width for MB[(Integer A)] item in column 4, row 0 to 3.00% of the total screen width
-




Multiboard - Set the width for MB[(Integer A)] item in column 5, row 0 to 6.00% of the total screen width
-




Multiboard - Set the display style for MB[(Integer A)] item in column 0, row 0 to Show text and Hide icons
-




Multiboard - Set the display style for MB[(Integer A)] item in column 5, row 1 to Show text and Show icons
-




Multiboard - Set the text for MB[(Integer A)] item in column 1, row 2 to MB_TEAM_ONE_NAME
-




Multiboard - Set the text for MB[(Integer A)] item in column 1, row ((Number of players in MB_T1_PLAYERS) + 4) to MB_TEAM_TWO_NAME
-




Multiboard - Set the text for MB[(Integer A)] item in column 2, row 1 to L
-




Multiboard - Set the text for MB[(Integer A)] item in column 3, row 1 to K
-




Multiboard - Set the text for MB[(Integer A)] item in column 4, row 1 to D
-




Multiboard - Set the text for MB[(Integer A)] item in column 5, row 1 to (Colour[14] + Gold|r)
-




Multiboard - Set the icon for MB[(Integer A)] item in column 5, row 1 to MB_GOLD_ICON_PATH
-




Multiboard - Set the width for MB[(Integer A)] item in column 2, row (MB_PLAYER_COUNT_ALL + 6) to 5.00% of the total screen width
-




Multiboard - Set the text for MB[(Integer A)] item in column 1, row (MB_PLAYER_COUNT_ALL + 6) to Time Elapsed:
-




Multiboard - Set the text for MB[(Integer A)] item in column 2, row (MB_PLAYER_COUNT_ALL + 6) to 0 : 00
-




Player Group - Pick every player in MB_T1_PLAYERS and do (Actions)
-





Loop - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 1, row ((Position of (Picked player) in MB_LB[1]) + 2) to (Colour[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
-






Multiboard - Set the text for MB[1] item in column 5, row ((Position of (Picked player) in MB_LB[1]) + 2) to (Colour[14] + ((String(((Picked player) Current gold))) + |r))
-




Player Group - Pick every player in MB_T2_PLAYERS and do (Actions)
-





Loop - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 1, row ((Position of (Picked player) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (Colour[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
-






Multiboard - Set the text for MB[2] item in column 5, row ((Position of (Picked player) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (Colour[14] + ((String(((Picked player) Current gold))) + |r))
-




For each (Integer B) from 2 to ((Number of players in MB_T1_PLAYERS) + 2), do (Actions)
-





Loop - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row (Integer B) to 0
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row (Integer B) to 0
-




For each (Integer B) from ((Number of players in MB_T1_PLAYERS) + 4) to (((Number of players in MB_T1_PLAYERS) + 4) + (Number of players in MB_T2_PLAYERS)), do (Actions)
-





Loop - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row (Integer B) to 0
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row (Integer B) to 0
-


-------- ----- SHOWING MULTIBOARD TO RESPECTIVE TEAMS! ----- --------
-


For each (Integer A) from 0 to 4, do (Actions)
-



Loop - Actions
-




Custom script: if (GetLocalPlayer() == Player(GetForLoopIndexA())) then
-




Multiboard - Show MB[1]
-




Custom script: endif
-


For each (Integer A) from 5 to 9, do (Actions)
-



Loop - Actions
-




Custom script: if (GetLocalPlayer() == Player(GetForLoopIndexA())) then
-




Multiboard - Show MB[2]
-




Custom script: endif
-


-------- ----- PLAYER LEAVES! ----- --------
-


Player Group - Pick every player in MB_PG_ALL and do (Actions)
-



Loop - Actions
-




Trigger - Add to MBUpdateLeaver <gen> the event (Player - (Picked player) leaves the game)
-


-------- ----- TURN ON UPDATING OF MULTIBOARD TRIGGERS! ----- --------
-


Trigger - Turn on MBUpdateDying <gen>
-


Trigger - Turn on MBUpdateLeaver <gen>
-


Trigger - Turn on MBUpdateLevel <gen>
-


Trigger - Turn on MBUpdateTimeAndGold <gen>
-


-------- ----- I DON'T NEED THIS NOW! ----- --------
-


Custom script: call DestroyTrigger(gg_trg_MBCreate)
-
MBUpdateDying
-

Events
-

Conditions
-


((Triggering unit) is A Hero) Equal to True
-

Actions
-


Set MB_DEATHS[(Player number of (Owner of (Triggering unit)))] = (MB_DEATHS[(Player number of (Owner of (Triggering unit)))] + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Owner of (Killing unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
-



Then - Actions
-




Set MB_KILLS[(Player number of (Owner of (Killing unit)))] = ((Player number of (Owner of (Killing unit))) + 1)
-



Else - Actions
-


-------- // UPDATE MULTIBOARD // --------
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True
-





Then - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row ((Position of (Owner of (Triggering unit)) in MB_LB[1]) + 2) to (String(MB_DEATHS[(Player number of (Owner of (Triggering unit)))]))
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row 2 to (String((MB_DEATHS[1] + (MB_DEATHS[2] + (MB_DEATHS[3] + (MB_DEATHS[4] + MB_DEATHS[5]))))))
-





Else - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row ((Position of (Owner of (Triggering unit)) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (String(MB_DEATHS[(Player number of (Owner of (Triggering unit)))]))
-






Multiboard - Set the text for MB[(Integer A)] item in column 4, row ((Number of players in MB_T1_PLAYERS) + 4) to (String((MB_DEATHS[6] + (MB_DEATHS[7] + (MB_DEATHS[8] + (MB_DEATHS[9] + MB_DEATHS[10]))))))
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Owner of (Killing unit)) is an ally of Player 1 (Red)) Equal to True
-





Then - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row ((Position of (Owner of (Killing unit)) in MB_LB[1]) + 2) to (String(MB_KILLS[(Player number of (Owner of (Killing unit)))]))
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row 2 to (String((MB_KILLS[1] + (MB_KILLS[2] + (MB_KILLS[3] + (MB_KILLS[4] + MB_KILLS[5]))))))
-





Else - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row ((Position of (Owner of (Killing unit)) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (String(MB_KILLS[(Player number of (Owner of (Killing unit)))]))
-






Multiboard - Set the text for MB[(Integer A)] item in column 3, row ((Number of players in MB_T1_PLAYERS) + 4) to (String((MB_KILLS[6] + (MB_KILLS[7] + (MB_KILLS[8] + (MB_KILLS[9] + MB_KILLS[10]))))))
-
MBUpdateLeaver
-

Events
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Triggering player) is an ally of Player 1 (Red)) Equal to True
-





Then - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 1, row ((Position of (Triggering player) in MB_LB[1]) + 2) to (Colour[9] + ((Name of (Triggering player)) + |r))
-





Else - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 1, row ((Position of (Triggering player) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (Colour[9] + ((Name of (Triggering player)) + |r))
-
MBUpdateLevel
-

Events
-


Unit - A unit Gains a level
-

Conditions
-


((Triggering unit) is A Hero) Equal to True
-

Actions
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True
-





Then - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 2, row ((Position of (Owner of (Triggering unit)) in MB_LB[1]) + 2) to (String((Hero level of (Triggering unit))))
-





Else - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 2, row ((Position of (Owner of (Triggering unit)) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (String((Hero level of (Triggering unit))))
-
MBUpdateTimeAndGold
-

Events
-


Time - Every 1.00 seconds of game time
-

Conditions
-

Actions
-


Set MB_TIME_SECONDS = (MB_TIME_SECONDS + 1)
-


Player Group - Pick every player in MB_T1_PLAYERS and do (Actions)
-



Loop - Actions
-




Multiboard - Set the text for MB[1] item in column 5, row ((Position of (Picked player) in MB_LB[1]) + 2) to (Colour[14] + ((String(((Picked player) Current gold))) + |r))
-


Player Group - Pick every player in MB_T2_PLAYERS and do (Actions)
-



Loop - Actions
-




Multiboard - Set the text for MB[2] item in column 5, row ((Position of (Picked player) in MB_LB[2]) + ((Number of players in MB_T1_PLAYERS) + 4)) to (Colour[14] + ((String(((Picked player) Current gold))) + |r))
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




MB_TIME_SECONDS Equal to 60
-



Then - Actions
-




Set MB_TIME_MINUTES = (MB_TIME_MINUTES + 1)
-




Set MB_TIME_SECONDS = 0
-



Else - Actions
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






MB_TIME_SECONDS Greater than or equal to 10
-





Then - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 2, row (MB_PLAYER_COUNT_ALL + 6) to (((String(MB_TIME_MINUTES)) + : ) + (String(MB_TIME_SECONDS)))
-





Else - Actions
-






Multiboard - Set the text for MB[(Integer A)] item in column 2, row (MB_PLAYER_COUNT_ALL + 6) to (((String(MB_TIME_MINUTES)) + : 0) + (String(MB_TIME_SECONDS)))
-
MBSettings
-

Events
-


Time - Elapsed game time is 0.00 seconds
-

Conditions
-

Actions
-


-------- CONFIGURABLES --------
-


Set MB_NAME = My Multiboard
-


Set MB_TEAM_ONE_NAME = (Colour[11] + Team 1|r)
-


Set MB_TEAM_TWO_NAME = (Colour[15] + Team 2|r)
-


Set MB_GOLD_ICON_PATH = UI\Feedback\Resources\ResourceGold.blp
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- -------------------------------------------------- DO NOT TOUCH !!!!! -------------------------------------------------- --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ----- CREATION OF LEADERBOARD TO GET MULTIBOARD POSITION ----- --------
-


Set MB_PG_ALL = (All players)
-


Set MB_T1_PLAYERS = (All allies of Player 1 (Red))
-


Set MB_T2_PLAYERS = (All allies of Player 6 (Orange))
-


Set MB_PLAYER_COUNT_ALL = (Number of players in MB_PG_ALL)
-


Leaderboard - Create a leaderboard for MB_T1_PLAYERS titled Team 1
-


Set MB_LB[1] = (Last created leaderboard)
-


Leaderboard - Hide (Last created leaderboard)
-


Leaderboard - Create a leaderboard for MB_T2_PLAYERS titled Team 2
-


Set MB_LB[2] = (Last created leaderboard)
-


Leaderboard - Hide (Last created leaderboard)
-


Player Group - Pick every player in MB_T1_PLAYERS and do (Actions)
-



Loop - Actions
-




Leaderboard - Add (Picked player) to MB_LB[1] with label (Name of (Picked player)) and value 0
-


Player Group - Pick every player in MB_T2_PLAYERS and do (Actions)
-



Loop - Actions
-




Leaderboard - Add (Picked player) to MB_LB[2] with label (Name of (Picked player)) and value 0
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------ --------
[trigger="Example Usage"]
Test
Events
Time - Elapsed game time is 0.10 seconds
Conditions
Actions
Game - Display to (All players) the text: Creating Multiboard...
Trigger - Run MBCreate <gen> (ignoring conditions)
[/trigger]