So I've had a problem for a bit. I've been trying to replicate the /tesfor command with /execute (as the title says) and I haven't had much luck between looking stuff up and also trying things myself. So the command im using is as follows:
/execute if entity @p[x=-2017,y=91,z=31029] run say hi
This command doesn't have a paticular purpose or reason besides me trying to gather more knowledge abut the game. so im wondering if I'm doing something wrong here. Any help on this subject will be appreciated because I've been looking on forums for a while and nothing quite answered my question. When i run JUST that command above it always says hi, but when i add a "distance=randomnumber" (/execute if entity @p[x=-2017,y=91,z=31029,distance=5] run say hi) it NEVER works. So yeah thats it i guess thanks for any help i might get!
Ok hi i just figured out the answer. I apparently needed a .. after the distance (like this: distance=..3) well anyway that was pretty simple im not sure why those dots are there but im sure there necessary! Bye people!
Hey everyone on this forum!
So I've had a problem for a bit. I've been trying to replicate the /tesfor command with /execute (as the title says) and I haven't had much luck between looking stuff up and also trying things myself. So the command im using is as follows:
/execute if entity @p[x=-2017,y=91,z=31029] run say hi
This command doesn't have a paticular purpose or reason besides me trying to gather more knowledge abut the game. so im wondering if I'm doing something wrong here. Any help on this subject will be appreciated because I've been looking on forums for a while and nothing quite answered my question. When i run JUST that command above it always says hi, but when i add a "distance=randomnumber" (/execute if entity @p[x=-2017,y=91,z=31029,distance=5] run say hi) it NEVER works. So yeah thats it i guess thanks for any help i might get!
-Meowzers21
Ok hi i just figured out the answer. I apparently needed a .. after the distance (like this: distance=..3) well anyway that was pretty simple im not sure why those dots are there but im sure there necessary! Bye people!
I had the same problem and you fixed it! thank you!
oh and I think you need these dots so it knows if bigger then this amount or smaller