Hello youtube and welcome to a quick explanation of the command blocks involved with the upcoming PvP team deathmatch game that I’m designing so rather than go through a really long explanation of what each of these blocks do I’m going to give you a brief explanation and then show you it in Action I’ve got a couple friends on the game with me and we’re going to be demonstrating the team deathmatch scorekeeping system that i’ve designed here so the gist of it is is that these command blocks create four teams red green yellow and blue these ones create some objectives to Keep track of kills these ones create dummy players to represent the teams in the scoreboard they don’t actually exist we just trick the game into thinking they do so that we can display them in the sidebar this sets the initial scores for the teams as you can see those fake Players are now inside bar representing the four teams and now I need to set my game-mode we’re going to go in survival and we need to set all the players initial scores and give ourselves a slight amount of damage to set the health score now we set the team options Which gives us the colors in our names and finally I’m going to turn friendly fire off I’m having a strange bug where sometimes friendly fire seems to apply between teams however if that happens we’ll just try to ignore it finally we’re going to turn on the clocks that Detect all the player updates and finally we get to join our teams so let’s get everybody over here and I’m going to join the blue team and we’re gonna hop over here into this tiny arena and show you how the game works so as you can see as soon as somebody Gets a kill it records that score for their team and as soon as I die my inventory is kept I don’t drop my items upon death but it detects that I’m dead and clears my inventory as you can see I just reached a checkpoint score my team reached two kills And as a result everybody on my team which right now is just me god speed boost defect and now the yellow team gets a speed boost effect and I reach three kills and our sorry five kills and I get a strength effect and as you can See let’s let Bryce and Lee here get a kill on me team scores are accumulative but player scores are individual so you can see the yellow team has two and one kills but the team kills score shows that the other team has a cumulative score of three And let’s try and get one more kill here before we see they’ve got the strength effect now you can want to hit me and as soon as it wears out I should be able to get one more kill and I can get on to explaining some more stuff map and it Looked like I was getting the friendly fire glitch there yeah I can’t seem to hit price or dais but I was able to kill Bryce and Lee and I now have ten kills and I think about make it to fifteen there’s one more there’s one more achievement I get and that is it Replaces all the swords of the people on the other team with swords that are broken one more killing we should get that and more days should have gotten a broken sword there but I guess we’ll never know all right and that’s the game you guys Can head out of here now thank you for helping me demonstrate this thank you alright so what exactly is going on here let’s just turn this off and clear everything out what’s happening is we have four teams standard minecraft scoreboard teams and then we have five primary objectives the first Objective is player kill count and it court skills and that displays that’s what the space in the tab menu and under players names although I think I had that turned off next we have dummy kills which is also player kill count this is what we use to keep track of how many Kills a player has gotten since last time the map checked to update the team score and then when it does it decrements that from the players account and get it back to zero the next is a dummy score objective called team kills and this is what displays in the sidebar And then we have team kills dummy another dummy and this is actually applied to all players on a team and that keeps track of their team’s score in the background since the other one is only for display purposes and is only held by the for fake players that I was Talking about and lastly we have a health objective and this is used for clearing a player’s inventory when they’re dead so I think we ran oops okay we need to run that next we have setting up the dummy players and this just creates four players scoreboard Teams join red and player red it would be essentially player with the username red we’re adding it to the scoreboard and the scoreboard doesn’t check to see whether the player actually exists or has even logged on so we can add fake players and we can display their scores On the side since they’ll be the only players receiving the team kills team kills objective next we need to set the initial scores for the fake players so we have command blocks here the first four set the team kills score to one and the other force of them back to zero and That updates the score so that it actually displays in the side bar as you can see there now we need to set the actual game player scores and it will give us a poison effect and that just updates our health by decrementing it by one so that our health is added to the Health score and last but not least we have the team options which just sets the colors for the teams and sets their see friendliness visibles to true and lastly we had we have the optional friendly fire offer on I like to turn it off however you’ll be able to choose Between those two in the final map now once the player joins a team in this case let’s join the blue team so as you can see my name is now blue and we have a zero kills and our team has zero kills and we activate this timer this timer Runs two different subroutines the first one checks for dead players and then clears their inventory and the second one is the kill counter and it’s here we have one for each of the four teams although only the blue and yellow teams have the objectives set up and I’ll Explain that in a moment what each of these first command blocks does is it checks for somebody on each of the four teams in order has dummy kills that have not been cleared yet and as soon as a person has dummy kills it’s going to activate this second timer and this Clock is going to run the actual gist of what happens so the first thing that happens when we activate that clock every time it pulses it adds one to the fake players or sorry the it adds one to the behind-the-scenes team kills value then it adds one to the display team Kills value to the fake player blue it announces that a player has scored a kill and it gives XP to that player this is going to be used for in-game purchases such as class upgrades one tick later it decrements one from the players dummy kills so the player Somehow manages to get five kills between the time or to even between the time this updates it’ll still count both of them since it subtracts one each time so the first time there’s gonna be two kills it’ll subtract one the second time there’ll be one kill little subtract one And then it’ll be no kill so the entire stream will shut off after that runs we lastly check to see if the behind-the-scenes team score which we can check and the reason we need a behind the team’s behind the scenes team score is because you can’t check the Score of players who don’t really exist so these fake yellow green red and blue players which while it would be convenient to check their scores we can’t so we have to check the scores of everybody or anyone who is on the actual team who is actually playing and that’s Why we need behind the scenes team kills dummy swore we check for specific scores such as 2 5 10 and 15 although in the actual math will be more like 10 20 30 and 40 with the game finally being one at 50 and we apply different effects so The first one checks for score up cue announces that the team has a score of 2 and gives a speed boost to the team the second one detects that the team has a sort of 5 announces that the team has a score of 5 and gives I believe again as The strength effect to the entire team this one checks for his total score of 10 announces a score of 10 and that gives us honest effects to any team that isn’t team blue and lastly we check for a score of 15 announced the score of 15 and then simultaneously clear diamond Swords from the inventory of anybody who isn’t on Team blue and replaces them with a diamond sword that is nearly broken so that’s how that works and if you see it in effect here I have this this simulates adding one to both our personal kills and the background kills So if we do that I’ll register a kill for the blue team and you can see it updated there and you can also see that if I give myself five kills at a loop until it has added all five kills to the team then you can see my score is six And the team kills score is six and I’ve also got the potion of ice so that’s how that works and before I go I want to show you one more thing I also designed how I want the teams to be able to choose their classes so the five classes that I’ve Chosen other than not having a class is palace guards ninjas tanks arsonists and snipers now each of these classes has their own unique special abilities and I’ve discussed at great length with the people in my live streams about these classes and trying to get them very fairly balanced and of course we’re Gonna heavily beta test this map to make sure that they are I wanted a very smooth experience for players choosing that the class that they wanted and I didn’t want them to have to spend a lot of time in a little room boxed in reading signs describing the class I Wanted one single screen that showed them everything they needed to know about each class and allowed them to choose it with a single click and I didn’t want that clique to be a button so what we have here is to command blocks that’s right this entire thing Will be run by two command blocks or at least two commands in reality it’ll be one command block for each team’s selection selection room and then four or five command sorry five or six command blocks depending on exactly how I decided to do it to detect whether or not they’ve chosen one class Or another and contrary to what you may believe this does not involve clearing items out of the players inventory I didn’t want the map to ever clear items out of a players inventory unless it was related to an objective or the player dying so the solution I came up with was Quite extravagant it involves extremely long command block commands very complicated once I spent a great deal of time getting the commands correct and in fact once I did get them correct I found it very difficult to actually get them into the command blocks in Minecraft you can’t enter color codes you can’t even Copy paste them in anymore and as I found out you can’t use mcedit to paste in long commands they recently lifted the 128 character limit on command block commands and mcedit has not reflected this change so I had to find a NBT tag editor that allowed me to Have NBT strings longer than 128 characters but once I was able to do that I was able to create these command blocks so let’s take a look at what they do this command block here simply creates a hopper that’s right it creates a hopper this is a very special hopper However and you will begin to understand why the command is so long to create this hopper once we open it and see that it is already full of items and each of these items has a lot of very special information related to it it explains each of these weapon classes and what They do the different tiers that you can upgrade them to and etc the second important part of this is this command block here and this does almost exactly the same thing as this command block it has almost identically the same command except instead of place block it uses the test for block command And you can use it to test for blocks with specific MBT tags because of that we can test for inventory items with specific items in their inventory this command block checks for this exact copper with these items and exactly the arrangement and data they have now I Couldn’t take out a normal diamond armor piece and put it in here and have it still equate to the same item so as you see here we have a result of true this is the item we’re looking for if I take out any of these items it will no longer Match so what we do is we create one of these command blocks for they slay out this layout this layout and so on you get the idea because of that we can detect which class the user has clicked on by updating these very rapidly so as You can see it is already detected that we have no class chosen or we have proper block with all five items in them in the correct places and if you watch the lights in the background and the command output down here you’ll see that it’ll instantly detect which of these we Have clicked on now it says that we have chosen the palace guard class and light here is lit up now the ninja class the tank class the arsonist class and lastly the sniper class if we destroy this it will check nothing which indicates that the player would Have broken the map and even if they had we can instantly recreate the hopper like so thanks for watching and I can’t wait to release this map it’s going to be a lot of fun I played a couple rounds with my friends here before I started recording just to make sure everything Worked and other than the weird glitch where it acts as if players who aren’t on the same team are on the same team and have friendly fire enabled other than that glitch which I hope to start out soon this is a lot of fun to play we thoroughly enjoyed it even though our Scoreboard only goes to 15 here we ended up playing to about 30 before I finally said alright we got a start recording so I can’t wait to show you guys this if you want to see the map itself the arena please hop on my twitch livestream whenever I’m streaming it’s twitch TV Slash Sydney’s one that would be twitch TV Sydney’s one like so and you can see me working on it I’ve got the arena itself done we haven’t picked a name for the map yet we’re working on the spawn area and next we’re going to be working On the the class choosing rooms and then the team choosing team randomizer all that fun stuff and I really enjoy it if you guys join me in doing that on my livestream so I hope to see you soon and I hope you thoroughly enjoy this map when it is finally released thank you Video Information
This video, titled ‘Minecraft: PvP Team Deathmatch Command Block Setup’, was uploaded by Sidneys1 on 2013-11-27 20:42:43. It has garnered 38799 views and 495 likes. The duration of the video is 00:20:54 or 1254 seconds.
I run through the basics of my PvP Team Deathmatch map’s command blocks, and show you some gameplay!
Don’t worry, this isn’t the actual arena… If you want to see that please join me as I build it on my stream, at twitch.tv/sidneys1