Naminator
Coming Back To Life
- Reaction score
- 76
Well..first of all Hi everyone. As you can see this it's my first tutorial, it's about leaderboard cause i don't see many of that. Well here it goes..
First Part: Creating The Leaderboard
The event to create the leaderboard has to be Time Elpased., it can't be Map Init. You can use periodic event to create a continue leadboard to register something like experience, but that's not what am going. First I recommend to use variable for player group, and destroy them by custom scrpit. Well let's see how.
See that I set the Group Variable call [Players_InGame], you can put the name you want, and in that variable I check that the player I want to be on the leaderboard It's playing and It's a User.
Second Part: Setting The Players
Here we will set the players in the leaderboard with the action Player Group:, and then add them with correct label and the wanted value. Let's see how:
I picked every player in my Group Variable and then add them to the leaderboard. I created a variable for the multiboard to use it later In the value you can put the number you want. I recommend 0, beacuse leaderboard are most use for counting kills.
Third Part Part: Finishing The Leaderboard
Well now that we create the leaderboard and set on the players, it's time to finish the creation, but that's not all. First we will show the leadboard to all players and if we want you can order the leaderboard. What do I mean by "order the leaderboard". Let's see how:
See that I show the leaderboard to all player and then I sort it. At the final I use the Custom script to remove the Group Varible.
Third Part: Other Things
Leaves Game
Well let's say that a player has left the game and you want to put the word "Gone" in the player's label. Let's see how
We must create this trigger to check that a playe leaves. I only put Player 1 but you can add the other players. See that I change to player Label to "Gone.
Kills
Now let's say that you want to control the kills. Let's see how:
See that I created a variable for Kills. It's an Integer Variable with array. To check what player has kill the unit and add +1 to his value. Here you can sort the leaderboard. You can order the player depending of the value of the player. From bigger to smaller or backwards.
Fourth Part: Other Type Of Leaderboard
Team Leaderboard
You want to create a team leaderboard but you have no idea of Multiboards, you can easily create one with Leaderboards. Let's see how:
You see that I make to Group Variable. Team A and Team B. Before to add the Group Variable, mean the player. I add another one. Before Team A, I add Neutral Hostile and before Team B I add Neutral Victim. It separates one team from another, and it also can track the kills of the team.
"|cffffcc00", this I used to make it look more cool. It's the gold color.
Fifth Part: Leaderboard Things
Other things you can do with Leaderboard commands:
Leaderboard - Change the title of (Last created leaderboard) to <Your Title>
Leaderboard - Change the color of all labels for (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the color of all values for (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the display style for (Last created leaderboard) to Show the title, Show labels, Show values, and Show icons
Leaderboard - Remove Player 1 (red) from (Last created leaderboard)
Leaderboard - Change the color of the label for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the display style for Player 1 (red) in (Last created leaderboard) to Show the label, Show the value, and Show the icon
Leaderboard - Change the color of the label for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Well, that's all I can say. Hope it Helps! Thanks for reading.
First Part: Creating The Leaderboard
The event to create the leaderboard has to be Time Elpased., it can't be Map Init. You can use periodic event to create a continue leadboard to register something like experience, but that's not what am going. First I recommend to use variable for player group, and destroy them by custom scrpit. Well let's see how.
Code:
Leaderboard Tutorial
Acontecimientos
Time - Elapsed game time is 1.00 seconds
Condiciones
Acciones
Set Players_InGame = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
Leaderboard - Create a leaderboard for (All players) titled .:Your Title Here:.
See that I set the Group Variable call [Players_InGame], you can put the name you want, and in that variable I check that the player I want to be on the leaderboard It's playing and It's a User.
Second Part: Setting The Players
Here we will set the players in the leaderboard with the action Player Group:, and then add them with correct label and the wanted value. Let's see how:
Code:
Leaderboard Tutorial
Acontecimientos
Time - Elapsed game time is 1.00 seconds
Condiciones
Acciones
Set Players_InGame = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
Leaderboard - Create a leaderboard for (All players) titled .:Your Title Here:.
Set Leaderboard = (Last created leaderboard)
Player Group - Pick every player in Players_InGame and do (Actions)
Bucle: Actions
Leaderboard - Add (Picked player) to Leaderboard with label (Name of (Picked player)) and value 0
I picked every player in my Group Variable and then add them to the leaderboard. I created a variable for the multiboard to use it later In the value you can put the number you want. I recommend 0, beacuse leaderboard are most use for counting kills.
Third Part Part: Finishing The Leaderboard
Well now that we create the leaderboard and set on the players, it's time to finish the creation, but that's not all. First we will show the leadboard to all players and if we want you can order the leaderboard. What do I mean by "order the leaderboard". Let's see how:
Code:
Leaderboard Tutorial
Acontecimientos
Time - Elapsed game time is 1.00 seconds
Condiciones
Acciones
Set Players_InGame = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
Leaderboard - Create a leaderboard for (All players) titled .:Your Title Here:.
Set Leaderboard = (Last created leaderboard)
Player Group - Pick every player in Players_InGame and do (Actions)
Bucle: Actions
Leaderboard - Add (Picked player) to Leaderboardwith label (Name of (Picked player)) and value 0
Leaderboard - Show Leaderboard
Custom script: call DestroyForce (udg_Players_InGame)
See that I show the leaderboard to all player and then I sort it. At the final I use the Custom script to remove the Group Varible.
Third Part: Other Things
Leaves Game
Well let's say that a player has left the game and you want to put the word "Gone" in the player's label. Let's see how
Code:
Player Leaves
Acontecimientos
Player - Player 1 (red) leaves the game
Condiciones
Acciones
Leaderboard - Change the label for (Triggering player) in Leaderboard to "Gone"
We must create this trigger to check that a playe leaves. I only put Player 1 but you can add the other players. See that I change to player Label to "Gone.
Kills
Now let's say that you want to control the kills. Let's see how:
Code:
Kills
Acontecimientos
Unit - A unit dies
Condiciones
((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
Acciones
Set Kills[(Player number of (Owner of (Killing unit)))] = Kills[((Player number of (Owner of (Killing unit))) + 1)]
Leaderboard - Change the value for (Owner of (Killing unit)) in Leaderboard to Kills[(Player number of (Owner of (Killing unit)))]
See that I created a variable for Kills. It's an Integer Variable with array. To check what player has kill the unit and add +1 to his value. Here you can sort the leaderboard. You can order the player depending of the value of the player. From bigger to smaller or backwards.
Code:
Leaderboard - Sort (Last created leaderboard) by Value in Descendant order
Fourth Part: Other Type Of Leaderboard
Team Leaderboard
You want to create a team leaderboard but you have no idea of Multiboards, you can easily create one with Leaderboards. Let's see how:
Code:
Team Leaderboard
Acontecimientos
Time - Elapsed game time is 1.00 seconds
Condiciones
Acciones
Set Team_A = (All allies of Player 1 (red))
Set Team_B = (All allies of Player 6 (orange))
Leaderboard - Create a leaderboard for (All players) titled .:Team Leaderboard:.
Set Leaderboard = (Last created leaderboard)
Leaderboard - Add Neutral Hostile to Leaderboard with label |cffffcc00[First Team] and value 0
Custom script: set bj_wantDestroyGroup=true
Player Group - Pick every player in Team_A and do (Actions)
Bucle: Actions
Leaderboard - Add (Picked player) to Leaderboard with label (Name of (Picked player)) and value 0
Leaderboard - Add Neutral Victim to Leaderboard with label |cffffcc00[Second Team] and value 0
Custom script: set bj_wantDestroyGroup=true
Player Group - Pick every player in Team_B and do (Actions)
Bucle: Actions
Leaderboard - Add (Picked player) to Leaderboard with label (Name of (Picked player)) and value 0
Leaderboard - Mostrar Leaderboard
You see that I make to Group Variable. Team A and Team B. Before to add the Group Variable, mean the player. I add another one. Before Team A, I add Neutral Hostile and before Team B I add Neutral Victim. It separates one team from another, and it also can track the kills of the team.
"|cffffcc00", this I used to make it look more cool. It's the gold color.
Fifth Part: Leaderboard Things
Other things you can do with Leaderboard commands:
Leaderboard - Change the title of (Last created leaderboard) to <Your Title>
Leaderboard - Change the color of all labels for (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the color of all values for (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the display style for (Last created leaderboard) to Show the title, Show labels, Show values, and Show icons
Leaderboard - Remove Player 1 (red) from (Last created leaderboard)
Leaderboard - Change the color of the label for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Leaderboard - Change the display style for Player 1 (red) in (Last created leaderboard) to Show the label, Show the value, and Show the icon
Leaderboard - Change the color of the label for Player 1 (red) in (Last created leaderboard) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Well, that's all I can say. Hope it Helps! Thanks for reading.