Absolutely. First create two objectives, life and death
/scoreboard objectives add death deathCount
/scoreboard objectives add life dummy
Assign life to the sidebar
/scoreboard objectives setdisplay sidebar life
We can't display team scores, so we'll use player names to represent the teams. Assign a player named "Republic" to the Republic team, and a player named "CIS" to the CIS team. These player do not need to be on the world, but you'll need to use 1.8 to be able to test their values if they're not.
/scoreboard teams join (Team name) (Player name)
Next give each "team player" 100 life points
/scoreboard players set Republic life 100
/scoreboard players set CIS life 100
Now you've got the setup, let's work on some mechanics. There are several ways to do this part, I'll show the simplest. To detect when someone dies, you'll have a fairly slow clock, two tick at fastest, running this command.
/scoreboard players remove @r[team_Republic,death_min=1] death 1
Have a comparator leading out of this. be sure to put a redstone torch on the command block that locks the repeater whenever it's activated, which i can show you how to do if you want. The comparator will lead to this.
scoreboard players remove Republic life 1
Then, using 1.8, have a clock running this command with an inverted output
scoreboard players test Republic life 1
That comparator will run into a machine that ends the game and says CIS wins. If you need help setting it up, I'll be happy to post some pictures! But please be patient if they don't come right away, I'm quite busy at the moment.
Sorry, I don't think I explained what I need very well. I want to have 100 lives for each team. Each time a player dies, the life count for the team that they are on goes down by one. When that 100 goes to 0, the game ends. Is that a better explanation?
Sorry, I don't think I explained what I need very well. I want to have 100 lives for each team. Each time a player dies, the life count for the team that they are on goes down by one. When that 100 goes to 0, the game ends. Is that a better explanation?
That is what should happen here with the explanation I gave.
Rollback Post to RevisionRollBack
Quote me to get a quicker response! If I helped you in any way, please click the reputation square!
But this would require having a player named Republic in the game, would it not? I've never used teams before, so I don't fully understand how this would work
But this would require having a player named Republic in the game, would it not? I've never used teams before, so I don't fully understand how this would work
As long as you use 1.8 and /scoreboard players test then you will not need the players there. 1.8 allow you to use players on the scoreboard even if they aren't there.
Rollback Post to RevisionRollBack
Quote me to get a quicker response! If I helped you in any way, please click the reputation square!
As long as you use 1.8 and /scoreboard players test then you will not need the players there. 1.8 allow you to use players on the scoreboard even if they aren't there.
Ok, so I've got it working. I had to use a testfor with the clock that ends up removing a life, but when I tried testing it by killing myself, it deducted a point from both sides.
Ok, so I've got it working. I had to use a testfor with the clock that ends up removing a life, but when I tried testing it by killing myself, it deducted a point from both sides.
Did you have the parameters on the @p? They are important for two reasons. They keep the command from activating UNLESS someone has died, and they make sure they only take a point for the team the player is on. be sure to make one for each team.
scoreboard players remove @p[team=Republic,death_min=1] death 1
Again, the [team=Republic,death_min=1] is really important, it tells the Republic machine to only subtract a life when a player is dead, and when that player is on the right team.
Rollback Post to RevisionRollBack
Quote me to get a quicker response! If I helped you in any way, please click the reputation square!
/scoreboard objectives add death deathCount
/scoreboard objectives add life dummy
/scoreboard objectives setdisplay sidebar life
Next have two command blocks, with these commands. These should be connected to the starting machine, as they should happen at the beginning of a game.
The comparator coming out of the command block would trigger the victory of the CIS team, and vice versa with the Republic team.
Remember that the selectors (pieces of code enclosed in square brackets or "[]"s) are EXTREMELY important, as they tell each machine to ONLY decrement points when someone from their own team has died.
I hope this helped, and/or worked! If it didn't, run me through what's not, and I'll try to help.EDIT:
Be sure to invert the signal coming from the last command block
Rollback Post to RevisionRollBack
Quote me to get a quicker response! If I helped you in any way, please click the reputation square!
Is it possible to use scoreboard values as variables in other command blocks?
Depends on the type of variable, if computer language, depend on the type, (true or false is boolean type) and the integers is INT variable, this is used by JAVA programers.
Is there a way to detect if a player is blocking because i wanna make golden swords more useful by blocking taking 1xp lvl and spawning a fireball that u can shoot
Is it possible to use scoreboard values as variables in other command blocks?
Currently, I don't think so, but there might. This is untested, but try this: Set up two objectives, one called points and one called bank, then put some score into the bank objective.
Sorry, I don't think I explained what I need very well. I want to have 100 lives for each team. Each time a player dies, the life count for the team that they are on goes down by one. When that 100 goes to 0, the game ends. Is that a better explanation?
http://www.minecraftforum.net/topic/2114709-the-doom-of-the-doctor/
That is what should happen here with the explanation I gave.
http://www.minecraftforum.net/topic/2114709-the-doom-of-the-doctor/
Assigning which players? Adding the players "Republic" and "CIS" into their teams should be just like adding normal player to teams.
http://www.minecraftforum.net/topic/2114709-the-doom-of-the-doctor/
As long as you use 1.8 and /scoreboard players test then you will not need the players there. 1.8 allow you to use players on the scoreboard even if they aren't there.
Ok, so I've got it working. I had to use a testfor with the clock that ends up removing a life, but when I tried testing it by killing myself, it deducted a point from both sides.
http://www.minecraftforum.net/topic/2114709-the-doom-of-the-doctor/
Did you have the parameters on the @p? They are important for two reasons. They keep the command from activating UNLESS someone has died, and they make sure they only take a point for the team the player is on. be sure to make one for each team.
Again, the [team=Republic,death_min=1] is really important, it tells the Republic machine to only subtract a life when a player is dead, and when that player is on the right team.
http://www.minecraftforum.net/topic/2114709-the-doom-of-the-doctor/
Okay, well start with the basic commands
Next have two command blocks, with these commands. These should be connected to the starting machine, as they should happen at the beginning of a game.
Next you're going to want two clocks. I'm only going to show one, but the second would have the same commnds, but with CIS replacing Republic.
Note: The commands above the picture correlate with the command blocks in the picture left to right.
Also be sure to have something in the hopper.
Finally, to trigger the end to a game, set up this command to the same clocks, one for each team.
The comparator coming out of the command block would trigger the victory of the CIS team, and vice versa with the Republic team.
Remember that the selectors (pieces of code enclosed in square brackets or "[]"s) are EXTREMELY important, as they tell each machine to ONLY decrement points when someone from their own team has died.
I hope this helped, and/or worked! If it didn't, run me through what's not, and I'll try to help.EDIT:
Be sure to invert the signal coming from the last command block
My new Legend of the Pumpkin King adventure map:
http://www.planetminecraft.com/project/legend-of-the-pumpkin-king-18/
WAIT! Don't click that link, I'm working on a better version of the map.
If the bleeping command blocks would do what I tell them to.
/scoreboard teams add Blue
/scoreboard teams options color dark aqua
/scoreboard teams options friendly fire false
i dont know this...
plz, i need help with this...
Zethalescraft, the simple way to fix your problem:
Make sure you remove spacing or use underscores when placing in a value.
The Minecraft Wiki has more information!
~Feare
thx for helping
Depends on the type of variable, if computer language, depend on the type, (true or false is boolean type) and the integers is INT variable, this is used by JAVA programers.
I made a team, "Team_Survial_X" as Name and "Team Survial X" as display name.
I want to know what is "Display name" used for... It says for scoreboard sidebar, but I didn't found the command to show the teams there.
Any help?
Currently, I don't think so, but there might. This is untested, but try this: Set up two objectives, one called points and one called bank, then put some score into the bank objective.
scoreboard players add @a points {score:{name:"@p",objective:bank}}I know the score tag works in tellraw, but scoreboard may require an actual number. If this does work, it will help a lot with calculators
Also, I think the setdisplay commands were there, just in a spoiler.