Manix
Well-Known Member
- Reaction score
- 29
Alright, I'm going to show you how to create a basic Multiboard with Player Name, Kills and Deaths. Easiest tutorial for beginners.
Steps:
Step 1 - Creation
Step 2 - Changing Icons and Texts
Step 3 - Re-setting Texts - Kills and Deaths.
If you wish you can skip the explanation part, just create the 3 triggers at the bottom of the tutorial
Step 1
Open the trigger editor ( F4 ) and create a new folder. First of all create a variable which stores the number of all user players when the game has started. Open the variable editor ( Ctrl+B ) and click on the green "X" to create a new variable. Set the name to PlayersCount and the Type to Integer. Do NOT make it an Array [Do NOT put a tick on the "array" place]. Ok now we have the variable, we must set it, create a new trigger[I named mine "The Running Trigger" If you wonder what's that] with an event - time elapsed - 0 seconds and no conditions. Make a new action to set the variable:
Now create a new trigger for the multiboard creation with no events and no conditions. Make a new action to create the multiboard: [to remove some leaks minimize it]
Explanation: Columns are the vertical slots and rows are the horizontal ones.( I'm not sure if i spelled it correctly ) Set the rolls to 1 + PlayersCount (The variable we created earlier) so you have 1 free row to set "Players" "Kills" and "Deaths" at the top.
The easiest way to create the columns and rows correctly is by imaging this infront of you:
C = Column
R = Row
If you test the map now you will see alot of annoying eye icons, that's what we will remove in the next step:
Step 2
Instead of creating actions that remove all icons one by one create an action that changes the display style to hide icons and show text in column 0, row 0, that will remove the icons in all rows and columns.
Alright, we cleared the icons, now lets set the texts:
Create a new event which sets the text of column 1 row 1 to Player and increase its width to 10% of the screen size, so longer names can be contained:
Next set column 2 row 1 to Kills, there are going to be shown the player kills. Set the width to 3%.
Do the same thing to column 3 just change the text to Deaths
Now we will set the names of the players and the scores to 0, Create a variable of type String and name PlayerNames, make it an ARRAY [Set a tick on the tick box near "array"] and set the count to 12 and set the variable, also set the names and "0"'s in the multiboard trigger, just do as shown below:
Ok, we are done with the multiboard, lets set the kills and deaths count:
Step 3
Create a new variable named Score_Kills, make it an array with size 12, just like player names, type - Integer, create a new trigger with event an unit dies, and set the variable there, do as shown below:
The bounded text is a convertion - string to integer.
Now set the deaths, just make a new variable named Score_Deaths, make it an array with size 12 and set it just like Score_Kills, and make an action like shown below:
Now we are almost done, we just need to run the creating trigger, do as shown below:
And done, that was the basic, white colored multiboard with almost no leaks. Just for checkup, these are the full triggers:
The Running Trigger:
Creation of the Multiboard
Kills and Deaths
For questions - reply
I added the "minimize" part after i have posted the tutorial, that's why that part exists only in the first "creation" trigger. I'm sorry for that.
Extras
Clock: Change the first part in the "creation" trigger to:
Now create new actions at the creation trigger ( Recommended to be at the bottom of all actions [ Not at the pick player's bottom, the bottom bottom ] )
Empty space at the red place is recommended. Now create a variable named Clock_Sec_Min_Hour, make it an array with size 3 and type Integer. Now create a new trigger named Seconds and do this:
Now create a new trigger named Minutes and do as shown below:
Now create a new trigger named Hours and do as shown below:
On the underlined red place leave as much space as you left at the first one above.
That was it, now you have a pretty good clock in your multiboard
Steps:
Step 1 - Creation
Step 2 - Changing Icons and Texts
Step 3 - Re-setting Texts - Kills and Deaths.
If you wish you can skip the explanation part, just create the 3 triggers at the bottom of the tutorial
Step 1
Open the trigger editor ( F4 ) and create a new folder. First of all create a variable which stores the number of all user players when the game has started. Open the variable editor ( Ctrl+B ) and click on the green "X" to create a new variable. Set the name to PlayersCount and the Type to Integer. Do NOT make it an Array [Do NOT put a tick on the "array" place]. Ok now we have the variable, we must set it, create a new trigger[I named mine "The Running Trigger" If you wonder what's that] with an event - time elapsed - 0 seconds and no conditions. Make a new action to set the variable:
Code:
The Running Trigger
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Set PlayersCount = (Number of players in (All players controlled by a User player))
Now create a new trigger for the multiboard creation with no events and no conditions. Make a new action to create the multiboard: [to remove some leaks minimize it]
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Minimize (Last created multiboard)
Explanation: Columns are the vertical slots and rows are the horizontal ones.( I'm not sure if i spelled it correctly ) Set the rolls to 1 + PlayersCount (The variable we created earlier) so you have 1 free row to set "Players" "Kills" and "Deaths" at the top.
The easiest way to create the columns and rows correctly is by imaging this infront of you:
]
R = Row
If you test the map now you will see alot of annoying eye icons, that's what we will remove in the next step:
Step 2
Instead of creating actions that remove all icons one by one create an action that changes the display style to hide icons and show text in column 0, row 0, that will remove the icons in all rows and columns.
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Alright, we cleared the icons, now lets set the texts:
Create a new event which sets the text of column 1 row 1 to Player and increase its width to 10% of the screen size, so longer names can be contained:
Code:
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
[B]Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Players
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width[/B]
Next set column 2 row 1 to Kills, there are going to be shown the player kills. Set the width to 3%.
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Players
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
[B]Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 3.00% of the total screen width[/B]
Do the same thing to column 3 just change the text to Deaths
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Players
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 3.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Deaths
Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 3.00% of the total screen width
Now we will set the names of the players and the scores to 0, Create a variable of type String and name PlayerNames, make it an ARRAY [Set a tick on the tick box near "array"] and set the count to 12 and set the variable, also set the names and "0"'s in the multiboard trigger, just do as shown below:
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Players
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 3.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Deaths
Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 3.00% of the total screen width
[B]Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Set PlayerNames[(Player number of (Picked player))] = (Name of (Player((Player number of (Picked player)))))
Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Player number of (Picked player)) + 1) to PlayerNames[(Player number of (Picked player))]
Multiboard - Set the width for (Last created multiboard) item in column 1, row ((Player number of (Picked player)) + 1) to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + (Player number of (Picked player))) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Picked player))) to 0[/B]
Ok, we are done with the multiboard, lets set the kills and deaths count:
Step 3
Create a new variable named Score_Kills, make it an array with size 12, just like player names, type - Integer, create a new trigger with event an unit dies, and set the variable there, do as shown below:
Code:
Kills and Deaths
Events
Unit - A unit Dies
Conditions
((Triggering 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
(Player number of (Owner of (Triggering unit))) Greater than 0
(Player number of (Owner of (Triggering 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)
Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + (Player number of (Owner of (Killing unit)))) to [B](String(Score_Kills[(Player number of (Owner of (Killing unit[/B])))]))
Now set the deaths, just make a new variable named Score_Deaths, make it an array with size 12 and set it just like Score_Kills, and make an action like shown below:
Code:
Kills and Deaths
Events
Unit - A unit Dies
Conditions
((Triggering 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
(Player number of (Owner of (Triggering unit))) Greater than 0
(Player number of (Owner of (Triggering 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)
Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + (Player number of (Owner of (Killing unit)))) to (String(Score_Kills[(Player number of (Owner of (Killing unit)))]))
Set Score_Deaths[(Player number of (Owner of (Triggering unit)))] = (Score_Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Owner of (Triggering unit)))) to (String(Score_Deaths[(Player number of (Owner of (Triggering unit)))]))
Now we are almost done, we just need to run the creating trigger, do as shown below:
Code:
The Running Trigger
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Set PlayersCount = (Number of players in (All players controlled by a User player))
Trigger - Run Creation of the Multiboard <gen> (ignoring conditions)
And done, that was the basic, white colored multiboard with almost no leaks. Just for checkup, these are the full triggers:
The Running Trigger:
Code:
The Running Trigger
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Set PlayersCount = (Number of players in (All players controlled by a User player))
Trigger - Run Creation of the Multiboard <gen> (ignoring conditions)
Creation of the Multiboard
Code:
Creation of the Multiboard
Events
Conditions
Actions
Multiboard - Create a multiboard with 3 columns and (1 + PlayersCount) rows, titled The Name You Wish
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Players
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Kills
Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 3.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Deaths
Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 3.00% of the total screen width
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Set PlayerNames[(Player number of (Picked player))] = (Name of (Player((Player number of (Picked player)))))
Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Player number of (Picked player)) + 1) to PlayerNames[(Player number of (Picked player))]
Multiboard - Set the width for (Last created multiboard) item in column 1, row ((Player number of (Picked player)) + 1) to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + (Player number of (Picked player))) to 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Picked player))) to 0
Kills and Deaths
Code:
Kills and Deaths
Events
Unit - A unit Dies
Conditions
((Triggering 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
(Player number of (Owner of (Triggering unit))) Greater than 0
(Player number of (Owner of (Triggering 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)
Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + (Player number of (Owner of (Killing unit)))) to (String(Score_Kills[(Player number of (Owner of (Killing unit)))]))
Set Score_Deaths[(Player number of (Owner of (Triggering unit)))] = (Score_Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Owner of (Triggering unit)))) to (String(Score_Deaths[(Player number of (Owner of (Triggering unit)))]))
For questions - reply
I added the "minimize" part after i have posted the tutorial, that's why that part exists only in the first "creation" trigger. I'm sorry for that.
Extras
Clock: Change the first part in the "creation" trigger to:
Code:
Multiboard - Create a multiboard with 3 columns and ([B][U]2[/U][/B] + PlayersCount) rows, titled The Name You Wish
Now create new actions at the creation trigger ( Recommended to be at the bottom of all actions [ Not at the pick player's bottom, the bottom bottom ] )
Code:
Multiboard - Set the text for (Last created multiboard) item in column 1, row (PlayersCount + 2) to Clock[COLOR="red"][U]__[/U][/COLOR]0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (PlayersCount + 2) to 0
Multiboard - Set the text for (Last created multiboard) item in column 2, row (PlayersCount + 2) to 0
Multiboard - Set the width for (Last created multiboard) item in column 1, row (PlayersCount + 2) to 7.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 2, row (PlayersCount + 2) to 3.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 3, row (PlayersCount + 2) to 3.00% of the total screen width
Empty space at the red place is recommended. Now create a variable named Clock_Sec_Min_Hour, make it an array with size 3 and type Integer. Now create a new trigger named Seconds and do this:
Code:
Seconds
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Clock_Sec_Min_Hour[1] = (Clock_Sec_Min_Hour[1] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row (PlayersCount + 2) to ((String(Clock_Sec_Min_Hour[1])))
Now create a new trigger named Minutes and do as shown below:
Code:
Minutes
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Set Clock_Sec_Min_Hour[2] = (Clock_Sec_Min_Hour[2] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row (PlayersCount + 2) to 0
Set Clock_Sec_Min_Hour[1] = 0
Multiboard - Set the text for (Last created multiboard) item in column 2, row (PlayersCount + 2) to (String(Clock_Sec_Min_Hour[2]))
Now create a new trigger named Hours and do as shown below:
Code:
Hours
Events
Time - Every 3600.00 seconds of game time
Conditions
Actions
Set Clock_Sec_Min_Hour[3] = (Clock_Sec_Min_Hour[3] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 4, row (PlayersCount + 4) to 0
Set Clock_Sec_Min_Hour[2] = 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row (PlayersCount + 4) to (Clock[COLOR="red"][U]__[/U][/COLOR] + (String(Clock_Sec_Min_Hour[3])))
On the underlined red place leave as much space as you left at the first one above.
That was it, now you have a pretty good clock in your multiboard