1
Command Block Mini Game
I am trying to create a minecraft PVP and Spleef arenas. I undestand all the command block conecpts I need exept for one: how to make the game end when there is only one player left? Any help?
Create an account or sign in to comment.
12
1
I want to make a simmilar mechanism but for a lobby. What will be the code for /testfor at least x players within a certain radius
or
/testfor max y players within a certain radius?
or
/testfor max y players within a certain radius?
1
The actual command will not change. Whenever testfor finds another player that meets the requirements, it adds one to the signal strength outputted through the comparator. So to testfor a maximum amount of people in a lobby, you don't have to change the mechanism at all, all you have to do is add more items into the hopper on the left, so that the comparator reading the hopper's inventory outputs a higher strength. Similarly, to test for a minimum amount of people, you can use a similar circuit, but without the torch at the end.
1
It says the UUID provided is in an invalid format when I entered the command and powered the command block.
1
That's the general error message it gives when it couldn't find a player. So if you were outside the radius when you powered, it will give this message. Assuming that you copied the command Veritas gave to you, it should work fine. If you still can't find the issue, could you copy/paste the command back into the chat so we can check it out?
1
and it only tests for people in survival mode the [m=0] So that way people in /gamemode 3 can watch it and you are probably powering it in creative mode
1
/testfor @a[r=20,c=1,m=0] use this command so it only will count people in survival, so that way you can have people /gameode 3 watching without affecting the redstone
1
Under the center of the arena, so that way the radius can have an equal range to test for and it doesn't leave any part of the arena out and cause glitches. Then add about 5 or 10 blocks to the range just to be sure none of the arena is left out (and welcome to PMC!)
1
Just one more question: Where to place it? (both for PVP and spleef.)
1
Thanks Veritas025!
1
I'm assuming it worked
1
Set up the mechanism like this, then put this command in it /testfor @a[r=20,c=1]
You must place two items into the hopper on the left. The comparator facing into the torch must be right-clicked to be put into subtraction mode. Then torch is the output. to do whatever you want /tp @a to spawn or /title @p Has won. Change the radius to how big the arena is.
Then make sure when they respawn the spawnpoint is outside the arena or they will still be tested for if they are in a radius of 20. Then the comparator won't activate. That's why we have the radius. I haven't tested this since I have no one one to play with in LAN and that's also why the torch is on because I'm the only person in my world. Also make sure those 2 hoppers are a hopper clock. For anyone wondering The c is just takes the maximum amount of people it can select so we need this certain design for the mechanism.
MarkTheHuntScoreboards man...
i cant tell , cuz im learning scoreboards
Didn't even need any scoreboards
1
Scoreboards man...
i cant tell , cuz im learning scoreboards
i cant tell , cuz im learning scoreboards