I'm making a multiplayer minigame, I don't know how to test for another player in a radius, the command that i want is like when a player get near to another player in a radius of 3 then a command will run, execute @a ~ ~ ~ testfor @a[r=*radius*]
don't help because it will just target you in it, add the [c=*count*]
don't help me neither, because the command also return true if there's one match (and that's you)
Minecraft – How to test for another player in a radius
minecraft-commandsminecraft-java-edition
Best Answer
You almost got it. Use the
rm
parameter, which specifies the minimum distance:Where RM is less then R, logically.
Or, if you would like to execute a command after this one returns true, combine them together: