1
I would like to know how to check who is the last person alive in a small area. Im making a pvp game on a small arena and the last person alive wins but how can command blocks check for this. I don't want to use mod or plugin. I could use any help i can get. Thank you.
16
Hmmmm... Are you using a comparator clock? If you are, there is a bug in which you need to make the redstone line coming out of the clock be kinda long, but not long enough to need a repeater. Weird bug, I know, but I swear this happens to me so much...
If thats too confusing for you^^^, Try using Command Blocks to Tp the players into the Pvp. After they have been teleported another command block will change the spawnpoint of the players, shortly after one of the players lose the game they will be Teleported in the the new SpawnPoint. The losing player that has been teleported will land in a preasure plate, that will indicate that the player that wasnt teleported due to the fact that He/She didnt die, Won the Fight. To do this, the preasure plate that the losing person/Team stepped on will have to reset,To start another battle.
If you need more info in how to do this, Dont hesitate to ask.
~Monarchist
If you need more info in how to do this, Dont hesitate to ask.
~Monarchist
Awwwwww. Sorry to hear that
Any ideas why it doesn't work?
Any ideas why it doesn't work?
No not really. It says that it is an "unknown command" in the "previous output" bar. I copied and pasted both of the examples and it couldn't recognize the testfor command in either.
Thanks for the help but neither method seemed to work.
Remember that if you use byBrutec's method to reset the scoreboard objective death after each game! Otherwise, you will only be able to play the map once!
I honestly like his method better. A lot simpler than mine.
I honestly like his method better. A lot simpler than mine.
also im not sure if this system keeps track for fresh joined players so you should do at the start of the game an:
/scoreboard players set @a death 0
because new players would have an death score of "-" (nothing) i guess but im not sure!
/scoreboard players set @a death 0
because new players would have an death score of "-" (nothing) i guess but im not sure!
I could help you more if i were there
Why should i do something like this oO ...and you could whitelist me
But okay .... so connect an command_block to an clock and give it that command line:
/testfor @a[score_death_min=0,score_death=0]
Then an comparator and two redstone_dust to an redstone torch so it negates the signal ...and here we go this should work ...one thing you have to add is the scoreboard objective death ...that tracks the deaths of the people ..
But okay .... so connect an command_block to an clock and give it that command line:
/testfor @a[score_death_min=0,score_death=0]
Then an comparator and two redstone_dust to an redstone torch so it negates the signal ...and here we go this should work ...one thing you have to add is the scoreboard objective death ...that tracks the deaths of the people ..
Try using a command similar to this:
/testfor @a[x=1,y=2,z=3,r=10]
r=10 is the radius to search for players. Replace this with however big the arena is.
x=1,y=2,z=3 are the coordinates for the center of the search radius I mentioned above. Make these coordinates the same as the center of your arena.
Make a setup like this:
T>--|----C>-------
_|---|
T= Redstone torch
> = Comparator (Pointing in the direction of the arrow)
- or | = Redstone dust
C = Command block with the command you made above
Right-click the comparator on the left. This makes it a redstone clock, and will activate the command block very quickly.
The command will see if there is a player within a certain radius (r=?) of the coordinates (x=?,y=?,z=?) you entered.
The strength of the redstone signal will determine how many players are in the above area. If the redstone line only activates for 1 block long, there is one player in that area. If it activates for 2 blocks long, then there are 2 players there, and so on.
I hope this helped
Reply to me if you have any questions, or if I wasn't clear enough.
/testfor @a[x=1,y=2,z=3,r=10]
r=10 is the radius to search for players. Replace this with however big the arena is.
x=1,y=2,z=3 are the coordinates for the center of the search radius I mentioned above. Make these coordinates the same as the center of your arena.
Make a setup like this:
T>--|----C>-------
_|---|
T= Redstone torch
> = Comparator (Pointing in the direction of the arrow)
- or | = Redstone dust
C = Command block with the command you made above
Right-click the comparator on the left. This makes it a redstone clock, and will activate the command block very quickly.
The command will see if there is a player within a certain radius (r=?) of the coordinates (x=?,y=?,z=?) you entered.
The strength of the redstone signal will determine how many players are in the above area. If the redstone line only activates for 1 block long, there is one player in that area. If it activates for 2 blocks long, then there are 2 players there, and so on.
I hope this helped
Reply to me if you have any questions, or if I wasn't clear enough.
Could i join and help you there its very simple but its hard to explain :s
I don't think that would work. I can't open my minecraft to the public and I'm worried cause you could grief my world. If you have the time can you explain it please?
latest snapshot. I could use 1.7.5 if that's better
Either use the /tellraw command or /testfor command.
Like a format? I don't know how to use both of these commands
Which minecraft version are you using?
