I'm trying to make a portal so that when you step inside a block (ex. x=1,y=1,z=1) that you will be teleported elsewhere (ex x=4,y=4,z=4). What would the syntax be for this?
You'll need a radius (r=#) within the parameters, otherwise it will take all players anywhere (which is sad that this would happen, but that's how it works unfortunately). Unless something else is wrong.
Yep. I'm having the same problems too. For some reason, command blocks aren't working good in 1.7.2. The only command that works for me is /say blah blah blah. I guess its a bug that Mojang will fix soon. Good Luck though.
The numbers in the brackets are the source radius and the search radius, and the numbers after the brackets are the destination. So that can be read as "Teleport any player within a 1-block radius of 1,1,1 to 4,4,4."
I, personally, prefer to use a slightly larger search radius and @p to target the nearest player to account for players not standing exactly where I want them to. So, if I were using the same coordinates as the above example, I'd type:
tp @p[1,1,1,2] 4 4 4
Finally, don't forget to use a redstone signal to activate the command block. If you want an automatic activation, you should use a clock signal.
Rollback Post to RevisionRollBack
"I'm an engineer. That means I solve problems. Not problems like,
'What is beauty?', because that would fall within the purview of your
conundrums of philosophy. I solve practical problems."
[color=#282828][font=Verdana, Geneva, Tahoma, sans-serif][size=small][background=rgb(232, 239, 244)]You'll need a radius (r=#) within the parameters, otherwise it will take all players anywhere (which is sad that this would happen, but that's how it works unfortunately). Unless something else is wrong.[/background][/size][/font][/color]
Enter "0" as the radius to ONLY select that exact coordinate. Entering "1" will make a cuboid 1 away in every direction from the coordinate (3x3 block around it) and 2 would be 2 away in every direction (5x5 block around the coordinate).
In this particular command, "x=" "y=" "z=" and "r=" is not needed, though it will work perfectly fine with them in there.
"/tp @p[1,1,1,0] 4 4 4" is the same as "/tp @p[x=1,y=1,z=1,r=0] 4 4 4"
And to get back it would be /tp @p 1 1 1
In case you want to know how these works, here:
/tp is the command to teleport.
@p is the closest player (almost certainly the one setting off the machine)
4 4 4 / 1 1 1 is the x, y, and z values
I thought it would be:
/tp @a[x=1,y=1,z=1] 4 4 4
But it's not.
Got that part figured out too. I have a clock that is constantly triggering the command block. The only part that is not working is the syntax.
You'll need a radius (r=#) within the parameters, otherwise it will take all players anywhere (which is sad that this would happen, but that's how it works unfortunately). Unless something else is wrong.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
tp @a[x,y,z,r] x y z
In your case:
tp @a[1,1,1,1] 4 4 4
#Pleaselockthread
I tried /tp @a 7 5,000 1 And it didn't work
Well, for you, make sure you're not putting comma in your numbers. For example, your "5,000" should be "5000".
Also, note this post:
The numbers in the brackets are the source radius and the search radius, and the numbers after the brackets are the destination. So that can be read as "Teleport any player within a 1-block radius of 1,1,1 to 4,4,4."
I, personally, prefer to use a slightly larger search radius and @p to target the nearest player to account for players not standing exactly where I want them to. So, if I were using the same coordinates as the above example, I'd type:
tp @p[1,1,1,2] 4 4 4
Finally, don't forget to use a redstone signal to activate the command block. If you want an automatic activation, you should use a clock signal.
"I'm an engineer. That means I solve problems. Not problems like,
'What is beauty?', because that would fall within the purview of your
conundrums of philosophy. I solve practical problems."
Enter "0" as the radius to ONLY select that exact coordinate. Entering "1" will make a cuboid 1 away in every direction from the coordinate (3x3 block around it) and 2 would be 2 away in every direction (5x5 block around the coordinate).
In this particular command, "x=" "y=" "z=" and "r=" is not needed, though it will work perfectly fine with them in there.
"/tp @p[1,1,1,0] 4 4 4" is the same as "/tp @p[x=1,y=1,z=1,r=0] 4 4 4"