How to set radius of testfor command in minecraft
I have looked through many questions and have not found this, i would like to have it so the redstone activates once the player goes in a certain area, this is almost done but for some reason it is measuring the radius in chunks, not blocks, any advice?
I have tried everything, please help.
Best Answer
The m after r=2 is unnecessary and does not search for that number of chunks (thanks @Skylinerw). By adding it, the command block ignores the radius parameters and instead searches the entire world for the player. In order to search in a radius of 2 blocks, remove the m.
Your command should look like testfor @p[x=437,y=72,z=2363,r=2].
Pictures about "How to set radius of testfor command in minecraft"



How do you Testfor a radius?
Enter the following command into a command block: /testfor @a[name=<name>,r=<radius>] , where <name> is a player's username and <radius> is the circular distance around the block. You could put this command block on an infinite redstone loop to make it run over and over, all the time.How do you test a player for a radius in Minecraft?
2. Type the CommandHow do you make a radius effect in Minecraft?
First off, use the procedure Execute Command / [Command] at x: [x] y: [y] z: [z]. Here are some examples of commands, you can use. This command gives every entity in a 15 block radius poison level 1 for 10 seconds. This command gives every entity except players in a 20 block radius regeneration level 2 for 15 seconds.Minecraft Command Block Tutorial - Testfor Radius Detector
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Xavier Messina, Xavier Messina, Karolina Grabowska, Mikhail Nilov

