1

Command Block Mini Game

avrona's Avatar avrona5/6/15 1:04 pm
1 emeralds 2.8k 12
6/15/2015 5:18 pm
Veritas025's Avatar Veritas025
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?
Posted by avrona's Avatar
avrona
Level 40 : Master Explorer
37

Create an account or sign in to comment.

12

1
06/13/2015 12:52 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
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?
1
06/13/2015 4:15 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
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
06/01/2015 12:37 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
It says the UUID provided is in an invalid format when I entered the command and powered the command block.
1
06/01/2015 3:55 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
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
06/15/2015 5:18 pm
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar
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
05/07/2015 11:08 am
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar
/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
05/07/2015 11:00 am
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar
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
05/07/2015 3:17 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Just one more question: Where to place it? (both for PVP and spleef.)
1
05/06/2015 4:00 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
Thanks Veritas025!
1
05/06/2015 5:58 pm
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar
I'm assuming it worked
1
05/06/2015 1:26 pm
Level 55 : Grandmaster Engineer
Veritas025
Veritas025's Avatar

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
05/06/2015 1:10 pm
Level 22 : Expert Network
YTCereal
YTCereal's Avatar
Scoreboards man...

i cant tell , cuz im learning scoreboards
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome