Hello! I have made a PvP arena for my friend and I to fight in. After a person has won, I would like to use command blocks to teleport both people to the center of the arena, as well as clearing their items and giving them a new kit (Iron armor, Iron sword, Steak, Bow, arrows, F n' S). Does anyone know how to do this?
Thanks!!!
P.S. I hope this is posted in the right section. If not, please let me know!
To teleport both the players, you could create this objective
/scoreboard objectives add death deathCount
Then have a command block hooked up to a clock running
/testfor @a[score_death=1]
Then hook a comparator from that command block to two more running these commands
/tp @a (Coordinates)
/scoreboard players reset @a death
That would teleport the players to a specific spot after killing one of the two, and set it up to be used again.
To give them the items, you would just need several /give command blocks to give them all the items.
If you want the players to spawn in different areas, set the spawn of the players with /spawnpoint in one place, and the teleport coordinates at another. When one dies, they will be spawned in the arena in one spot, and the other will be teleported to a different spot.
So I set it all up, and for some reason, I never teleport. I will put a few screenshots in this post to show how it is set up, so you can point me the right way if I am doing anything wrong. The first 3 screenshots show the commands, the fourth shows the command blocks giving items, and the fifths shows the setup.
So I set it all up, and for some reason, I never teleport. I will put a few screenshots in this post to show how it is set up, so you can point me the right way if I am doing anything wrong. The first 3 screenshots show the commands, the fourth shows the command blocks giving items, and the fifths shows the setup.
Figured out what to do. I just ran a sperate comparator from the command block with the testfor command, rather than chaining them with comparators. One comparator for teleporting, one for items, and one for reseting the scoreboard. Thanks for the help!
Thanks!!!
P.S. I hope this is posted in the right section. If not, please let me know!
Then have a command block hooked up to a clock running
Then hook a comparator from that command block to two more running these commands
That would teleport the players to a specific spot after killing one of the two, and set it up to be used again.
To give them the items, you would just need several /give command blocks to give them all the items.
If you want the players to spawn in different areas, set the spawn of the players with /spawnpoint in one place, and the teleport coordinates at another. When one dies, they will be spawned in the arena in one spot, and the other will be teleported to a different spot.
Did you set up the scoreboard with
Yes I did.
Figured out what to do. I just ran a sperate comparator from the command block with the testfor command, rather than chaining them with comparators. One comparator for teleporting, one for items, and one for reseting the scoreboard. Thanks for the help!