0

So, I am playing with my friend. For a few days, we have been working in a PVP arena. I also decided that I would use commands to do so. I would have a wall to separate the two players and when they click the start button, it removes the wall. So, I want to replace the wall when someone dies so the other person doesn't get unfair hits before the other person is ready. Please help!

0

1 Answer 1

0

You Need To Know

How chain command blocks work.

What

At spawn, have a pressure plate. Have each team tagged so we can identify them! I will use tags “blue” and “red”. When this pressure plate is pressed, have it run the commands:

/fill 7 2 0 7 10 10 brick

Make a brick wall from 7, 2, 9 to 7, 10, 10. Now an always active chain:

/tp @p[r=10,tag=red] 4 5 5

If red died, teleport them to where they need to go (I used 4, 5, 5). Do nothing if a blue player. Then another always active chain:

/tp @p[r=10,tag=blue] 10 5 5

Do the same for blue, let’s say blue needs to go to 10, 5, 5. Then, this is optional, but another always active chain:

/to @p[r=10] 30 20 25

If somehow someone without an assigned team spawns, let’s put them at 30, 20, 25. This could be a spectator area, lobby, etc.

4
  • Thank you so much you are the best Commented Oct 27, 2020 at 15:45
  • That helped so much Commented Oct 27, 2020 at 15:48
  • Just one thing. I don't know how to make teams Commented Oct 27, 2020 at 15:51
  • @ArjunRawat you can tag people with /tag command, you can just google it for more help if you need it
    – Penguin
    Commented Oct 27, 2020 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.