29

Using the scoreboard 1.8

Collectable

Enjoy reading!

  • 11,017
    Views, 90 today
  • 40 Comments
  • 17 Favorites
  • Flag / Report

Get Embed Code

Forum:
HTML:
Link:
avatar
Headaxe
Level 44 : Master Unicorn
USING THE SCOREBOARD 1.8
-a complete guide on all commands of the Scoreboard
There are several reasons for not using the scoreboard.
Some don't get what individual commands do while others couldn't find a good list with senseful explenations of all the commands.
But both these issues are no problem after reading this blog.
Even though it's hard work to learn all the tricks, working with the scoreboard gives you unbelievable new possibilities as a map creator and therefore it's more than worth it to invest time into the studies.


Instructions on reading this blog
I used a couple of color codes and other techniques in this blog, which you should better understand before reading.

(round brackets)A part of the command, you have to add to perform it
[square brackets]A part of the command, you can add if you want to

Blue
A scoreboard command
OrangeA list of options in a command, you can choose between
GreenAn example for the usage of the scoreboard



The most important trick
The scoreboard contains a lot of different types of objectives, different options for teams and much more which you would normally have to remember in order to use them.

It's obvious, that no one can remember all these different settings, however there is one button which saves your day.
Pressing tab automatically completes the part of the command, you are currently working on.

/scoreboard objectives add coins d -> *presses tab* ->  /scoreboard objectives add coins dummy

/scoreboard objectives
/scoreboard objectives list
Using this command allows you to see a detailed list of all objectives you added to the world.
/scoreboard objectives list

/scoreboard objectives add/remove
This command allows you to add objectives or to remove them.
When you are creating an objective, you'll have to add a criteriaType.
You can choose between 5 different types.
You can only remove objectives that already exist.
The internal name is always the name used in operations and more, while the display name only appears on lists and more.
Objective types
dummy: If somebody has an objective value/score with a criteria type named dummy, he won't be able to change the value by hand. The only way to change the value then, is to use a /scoreboard players command.
health: This type reflects your hearts. If you have 10 hearts, the score is 20.
totalKillCount: You get 1 point for killing any player, mob or animal.
playerKillCount: You get 1 point for killing any player.
deathCount: You get 1 point for each respawn.
achievement.(internal achievement name): Checks if you have earned a certain achievement
stat.(internal stat name): Tests for several actions like walking, being hit, falling and much more
stat.craftItem.(Item ID): Tests for crafting a certain item or block
stat.useItem.(Item ID): Tests for using an item (placing blocks, throwing eggs...)
stat.breakItem.(Item ID): Tests for breaking an Item (Mining with tools)
stat.mineBlock.(Block ID): Tests for amount of one type of blocks mined
stat.killedEntity.(Mob ID): Tests for amount of one type of mobs killed by the player
stat.entityKilledBy.(Mob ID): Tests how often the player was killed by one type of entities
stat.teamkill.(team color): Checks how many team members with a certain team color were killed by the player
stat.killedByTeam.(team color): Checks how often the player was killed by team members with a certain team color
You can add a custom name for your brand new objective too.
/scoreboard objectives add (internal objective name) (objective type) [display objective name]
/scoreboard objectives remove (internal objective name)

/scoreboard objectives setdisplay
People want to see their score, money, values or other people's hearts.
If you want to add this function, you can choose between three different display slots.
Remember that you can only put existing objectives into a setdisplay slot.
Display Slots
sidebar: Your score will be displayed at the right side of the screen.
Scores of players who aren't online get displayed too, so you can use this as a highscore list.
sidebar.team.(team color): The sidebar is only visible to players that are member of a team with a certain team color
belowname: If you are in a distance of 20 blocks to an other player, you will be able to see his score below the player name.
list: Press tab and the score will be displayed next to the name of a player.
If you don't add a name after the display slot, the slot will get cleared.
/scoreboard objectives setdisplay (display slot) [internal objective name]


/scoreboard players
/scoreboard players add/remove/set
This is the most essential command for interacting with player scores.
By using it you are able to modify a players score.
You can even add scores to nonexistant players, so they just exist for counting or multiplying scores etc.
Player names that are not supposed to appear in the sidebar or other lists, have to start with a ''#''.
Also, in 1.8 the option of selecting players with data tags in this command was added, so you are able to modifiy the value of entities and players, who have a specific tag.
This makes it possible to translate Data Tags into scoreboard values, which also makes a lot more things possible.
/scoreboard players remove (player) (internal objective name) (amount) {Data Tag}
/scoreboard players add (player) (internal objective name) (amount) {Data Tag}
/scoreboard players set (player) (internal objective name) (amount) {Data Tag}
/scoreboard players set #(player) (internal objective name) (amount)
Please remember, that you have to add extra charakters to the Data Tag Parts depending on the type of of the Part, you are trying to involve.
/scoreboard players set @e air 1 {Air:20s}


/scoreboard players reset
By using this command, you can reset all scores a player reached or reset one objective score a player reached.
''*'' is a new 1.8 selector which targets everyone tracked by the scoreboard.
Using it will reset everyone's score, even if they are not online, which is helpful when your sidebar is spammed with
player scores that are not even online and you don't want that.
/scoreboard players reset (player) [internal objective name]
/scoreboard players reset *


/scoreboard players list
Use this command to see the scores of different players or to see all players tracked by the scoreboard.
Without using a name, you can list all players tracked by the scoreboard.
By adding a name you can see all scores somebody has.
''*'' is a new 1.8 selector which targets everyone tracked by the scoreboard.
By using it as a player in this command you get every score of everyone tracked.
/scoreboard players list [player]
/scoreboard players list *

/scoreboard players test
Tests if a player has a score in a certain objective that's between a minimum score and an optional maximum score.
The command is much easier to use than the old /testfor way of testing.
Besides that, the player you are testing for mustn't be online or even existing, you can test for anything and anyone you want.
/scoreboard players test (player) (internal objective name) (min player score) [max player score]

/scoreboard players operation
That command is actually working like a calculator and helps you adding scores to each other, multiplying scores and much more.
The player you are calculating with, doesn't even has to be online, so you can use ''ghost'' players aswell.
Operation types
+= Adds the source player's source score to the target player's target score
-= Removes the source player's source score from the target player's target score
*= Multiplies the source player's source score with the target player's target score
/= Divides the target player's target score through the source player's source score
%=The source players' score is used as the percentage of the target players' score
=   The source players' score is turned into the target players' score.
/scoreboard players operation (target player) (internal target objective name) (operation type)
(source player) (internal source objective name)

This command is the most complicated part of the scoreboard, so I will explain you it a bit further.

The target player is always the player who's score will get affected in the end.
Whatever what operation you perform, the source players' score will not be modified.
The target objective is the objective which is going to be affected by the operation.

The operation type defines how source player and target player interact in the operation.

The source player is the player who's score is being added, removed, synchronnized etc. from/to/with the target player's score.
The source objective selects the objective that the source player is adding/removing etc. from/to/with the target player.

Here comes an extremely stupid example ^^: 
SethBling's coolness: 100 | Minecraft's redstone: 50
/scoreboard players operation SethBling coolness += Minecraft redstone
In this example Minecraft's 50 redstone would be added to SethBling's 100 coolness, which would mean that SethBling's coolness score is now 150.


/scoreboard teams
/scoreboard teams list
Use it to list all teams you created without adding a team name or check which players are in a certain team.
/scoreboard teams list [internal team name]

/scoreboard teams add/remove
Create or remove teams.
When you are creating a team you can type the system name first and then add a display name.
/scoreboard teams add (internal team name) [display team name]
/scoreboard teams remove (internal team name)

/scoreboard teams join/leave
You can join/leave a team, you created or let other people join/leave the team. If you use the command without a player, you will get selected as the person to join/leave the team.
/scoreboard teams join (internal team name) [player]
/scoreboard teams leave [player]

/scoreboard teams option
Use this command to customize a team.
There are several things you can change in a team, that affect it's appeareance or  the interaction between the players within a team.
Options
color: Select a display color for your team. The nametags of players will change their color to the team color you selected. Choose between "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", and "white".
friendlyfire: Tells if players in one team can attack each other. The option does not effect lava, potions, tnt, or other indirect attack sources. Choose between ''true and ''false''.
seeFriendlyInvisibles: Allows you to see a transparent player model of your team members, while they are invisible. Choose between ''true'' and ''false''.
nametagVisibility: Affects which people are able too see you team's nametag.
Choose between:
''never'': No one see's your nametag
''hideForOtherTeams'': Other teams can't see your nametag
''hideForOwnTeam'': Your own team can't see your nametag.
''always'': Everyone can see your nametag.
/scoreboard teams option (internal team name) (option) (value)


Player selection
If you want to interact with command blocks, you can add some scoreboard based arguments.
As you know, you can use @p @a and @r to select different players.
You can add special arguments to this players-selections.
In 1.8 you are able to select all entities using @e.
@a[score_money=100,score_money_min=100]
Will select all people who have a minimum score of 100 and a maximum score of 100.
@r[team=red]
Will select a random player, who is member of team red
@p[team=]
Will select the nearest player, who is member of no team.

Read the wiki article about Command Blocks, if you want to find out all about arguments.








~THE END~





If you want to read more nice tutorials:



                                 undefined 
Tags:Tutorial, How To, Scoreboard, Commands, Cheats, Command Blocks, Score, Display, Players, Minecraft, Objectives, Teams, PVP
Credit:Headaxe

Additions and Improvements : 09/14/2014 4:42:34 am9/14/14

+Added several parts like "Instructions on reading this blog"
+Added a couple of "forgotten" parts in the blog
+Improved the explenation for commands such as "scoreboard players operation and /scoreboard players set/add/remove
+Edited introduction and the top of the blog

Smaller Improvements and Fixes : 02/24/2014 5:34:40 am2/24/14

+Edited some command descriptions
+Fixed some grammar
+Fixed /teams option mistakes --> ''(option)'' and ''(player)'' switched
                                                         --> description of teams option nametagVisibility was false

Layout Fix : 02/19/2014 12:42:52 pm2/19/14

+Fixed all removed spoiler titles, colors and much more problems that occured in the new PMC text version.

Up-To-Date Update : 02/18/2014 10:17:03 pm2/18/14

+adding the 1.8 features one after another and giving the whole blog a new look

Reboot : 02/18/2014 9:34:22 pm2/18/14

+Fixed the formatting errors after a PMC update
+''Examples'' are now general command instructions
+Edited a few text parts

Optical Update : 06/22/2013 5:03:09 am6/22/13

+Fixed some grammar
+Edited the Highlight color of some things
+Changed the font size of the Headers

Smaller Improvements : 06/21/2013 12:07:53 pm6/21/13

+Fixed the bad spelling of scoreboard...ON THE COVER!
+Fixed some grammar
+Added some details about the new tutorial collection.

Comments :

Join us to post comments.

1 - 40 of 40

Seames39
Level 39
Artisan Pyro
November 22, 2014, 6:45 pm

Hey Im trying to make a PvP map with two teams and I want to make it so that when a player on one team kills a player on an enemy team, his/her kill counts towards a total team kill count. how do you do this?

Headaxe
Level 44
Master Unicorn
November 22, 2014, 11:59 pm

First, you add an objective called "kills" with the type playerKillCount in order to track the kills of players.
/scoreboard objectives add kills playerKillCount

After that, you have to use a nonexistant player, who receives all the points.
Execute the following command repeatedly with a fast clock:
/scoreboard players operation redkills kills = @a[team=red] kills

I hope, that was helpful ;D

Seames39
Level 39
Artisan Pyro
November 23, 2014, 8:32 am

Uh I don't see anything change. Is there a command to display it?

Headaxe
Level 44
Master Unicorn
November 23, 2014, 9:16 am

Use /scoreboard objectives setdisplay sidebar kills.
The player with the name "redkills" should then have the score of every player in the read team.

Seames39
Level 39
Artisan Pyro
November 23, 2014, 9:25 am

I am officially impressed :D Count me as a subscriber ;)

Arcaniax
Level 60
High Grandmaster Necromancer
October 31, 2014, 5:45 am

Someone i know uses dummy a lot because it's a placeholder for everything you want :)
he even made a working signshop with the trigger on signs now :P

DuckHD
Level 2
Apprentice Explorer
October 24, 2014, 4:47 am

Im making a minecraft map and im trying to every person have 5 lives, i used the dummy command and death commands, but it still wont remove points when i die, help?

Headaxe
Level 44
Master Unicorn
October 24, 2014, 5:50 am

There is no type of objective that removes your lifes if you die.
However, there is an objective type called deathCount which will add one point every time you die to itself.

What you have to make is a translator.
Set up a clock which triggers two command blocks at once, but make sure they get activated in the correct order.
1. "/scoreboard players remove @a[score_deaths_min=1] lifes 1"
2. "/scoreboard players remove @a[score_deaths_min=1] deaths 1"

This way the deaths are being translated into a loss of lifes.
In order to make a reaction after someone lost all lifes simply add another one saying:
3. "/kill @a[score_lifes=0]" (only an example, doesn't have to kill players)

To add lifes simply add "/scoreboard players set player lifes 5"

Two most known sources of bugs are:
1. Command blocks being activated in the same tick, but not in the correct order
2. Testing for player's scores doesn't work if they never had a score in an objective

I hope I could help you with this, have a nice day!

xin8
Level 5
Apprentice Architect
October 2, 2014, 3:20 pm

I'm making an adventure map and theres a part where when you step on a pressure plate, and your dummy variable is 1 (which I already set)  you get an item, which can be used multiple times. I put your /scoreboard players test command (which works fine) and it sends out a signal via comparator. The problem is, I want a pulse signal, like a button, not a full signal because I want this pressure plate to be reusable. Do you know how to make it so that it only sends a pulse signal? thanks

Headaxe
Level 44
Master Unicorn
October 2, 2014, 4:02 pm

Make something which updates the command block which outputs the comparator signal.
Everytime a command block is being updated by redstone or by recreating/modifying the block, it resets it's score.

In theory /blockdata x y z {SuccessCount:0} should reset the output of the command block.
If it does not work, try /setblock x y z minecraft:command_block 0 replace {Command:...} to recreate the block.
If it still doesn't work, use a /clone command to recreate the command block and the comparator.

All three methods should work in theory.

xin8
Level 5
Apprentice Architect
October 3, 2014, 1:09 pm

Thanks dude!

ToadieOdie
Level 32
Artisan Goblin
September 14, 2014, 3:05 am

The dummy objective is really handy for tracking story/quest progression on an adventure map and for making vanilla starter kits for server maps. Both are handled by command blocks.

I'm sure there are many more creative ways to use the scoreboard. It would be great if readers would share what they used the scoreboard for to help inspire new map makers.

Headaxe
Level 44
Master Unicorn
September 14, 2014, 3:12 am

Well I am actually quite sure that there are forums posts which handle that quite well.
In the end, using the scoreboard is always a thing for solving problems, tracking stuff, adding custom ai, items, entity behavior and more.

There is always a problem to solve which you have to have before thinking about how to solve it.
However, some inspiration could help indeed ;D

ToadieOdie
Level 32
Artisan Goblin
September 14, 2014, 3:17 am

Ah, I hadn't thought to check the forums for that. I was just thinking about the people coming here wanting to know what the scoreboard is and have never used it before.

All the technical information in here is great though. :3

huge_chomper
Level 15
Journeyman Pig
September 14, 2014, 1:07 am

I think you have a problem spelling the word "certain"? you keep writing cercaint. 

In-depth information, well done.

Headaxe
Level 44
Master Unicorn
September 14, 2014, 1:36 am

Yeah this blog is quite old and with every update I forgot to fix those issues.
Time for that now ;D

Wolf_Kaboozles
Level 1
New Crafter
August 30, 2014, 3:39 am

sorry im a noob trying to make a map. What's the command to add a dummy score?

Headaxe
Level 44
Master Unicorn
August 30, 2014, 4:12 am

/scoreboard objectives add (internal name) dummy (display name)

iCraZzMC
Level 31
Artisan Soldier
August 27, 2014, 3:20 am

question! what about entities? I heard that Entities can have scoreboards too

Headaxe
Level 44
Master Unicorn
August 27, 2014, 4:20 am

You can assign scoreboard values to entities using
/scoreboard players set @e[type=Creeper] score 1
for example.

They basically act exactly like a normal player in the scoreboard.

Moose
Level 1
New Ranger
August 4, 2014, 10:25 am

I'm pretty sure this has so many views and so few diamonds because anybody without an account can google "how to use scoreboard 1.8" and this will pop up pretty near to the top.  It happened with one of my blogs too.

Headaxe
Level 44
Master Unicorn
August 4, 2014, 10:47 am

That might be true.
Well, still a good xp-farm.
Holy crap, my blog is actually 1st place on google! 
http://gyazo.com/464743074991c10956619a7f76b78aa2

Moose
Level 1
New Ranger
August 4, 2014, 11:20 am

Moose
Level 1
New Ranger
August 4, 2014, 11:14 am

Yeah, man.  It's great.

Headaxe
Level 44
Master Unicorn
August 4, 2014, 11:22 am

Still not 1st place ;D

Moose
Level 1
New Ranger
August 4, 2014, 11:41 am

Hard to beat the wiki, lol.

Headaxe
Level 44
Master Unicorn
August 4, 2014, 11:48 am

Well, I did beat the wiki....with higher quality and information...and ease to use.

Moose
Level 1
New Ranger
August 4, 2014, 12:02 pm

The wiki didn't have a specific page dedicated towards only the scoreboard though, lol.

Headaxe
Level 44
Master Unicorn
August 4, 2014, 12:05 pm

Yes, it has actually.
There is a list, just like mine, with all commands n' stuff, but of course it is not as good as mine... ;D

TaintedEnergy
Level 33
Artisan Mage
May 16, 2014, 5:43 pm

man this is so useful. I was so confused with /scoreboard players operation...

GalePlay
Level 13
Journeyman Dragonborn
March 11, 2014, 5:16 am

Hi,
I'm doing some stuff with the scoreboard objective "stat.mineBlock.stained_glass" but I don't know how to set the color of the stained glass. Do you know how I can do this? Would be nice :)

Headaxe
Level 44
Master Unicorn
March 11, 2014, 7:25 am

I'm sorry, but it is not possible to specify the damage value in this case.

GooDGrounD
Level 7
Apprentice Taco
March 4, 2014, 6:17 am

Omg Thnx Diamond For You!

DragonhuntIII
Level 17
Journeyman Dragonborn
March 4, 2014, 5:55 am

Looks good

Slimeball18904
Level 11
Journeyman Dragon
July 14, 2013, 9:51 am

Thx for helping me make my pvp map!

Headaxe
Level 44
Master Unicorn
July 14, 2013, 11:39 am

No problem ;)

Slimeball18904
Level 11
Journeyman Dragon
July 14, 2013, 12:02 pm

Oh btw, your english wasn't that bad.

iVelocityGaming
Level 28
Expert Network
June 21, 2013, 2:58 pm

Nice blog. Keep up the awesome work!

Headaxe
Level 44
Master Unicorn
June 21, 2013, 3:01 pm

Thanks dude.
I am already working on a new tutorial called ''Advanced Scoreboard''.
So keep an eye on me if you don't want to miss it :D

iVelocityGaming
Level 28
Expert Network
June 21, 2013, 3:03 pm

Awesome. Your tutorials are really helpful!

1 - 40 of 40