I am almost sure that set block relative to player is possible even though there is no exact command for it (please correct me if i'm wrong). I have experimented with this for a while (like an hour) and I cant find a way to do it. I am sure that you are a lot smarter than me at commands so if you find this out I would be extremely grateful. Any help is greatly appreciated.
I am almost sure that set block relative to player is possible even though there is no exact command for it (please correct me if i'm wrong). I have experimented with this for a while (like an hour) and I cant find a way to do it. I am sure that you are a lot smarter than me at commands so if you find this out I would be extremely grateful. Any help is greatly appreciated.
Thanks
There is no direct way to do this. The only way is to have the player click on /tellraw clickEvent text that contains the command. Commands run in this manner are run as if the player typed them out, thus you can use them as the center point. However, this requires the player to actually click on the text. The player must also be an OP in order to run the command. The /tellraw command can only run one command, which makes it even more useless for this purpose.
There is no direct way to do this. The only way is to have the player click on /tellraw clickEvent text that contains the command. Commands run in this manner are run as if the player typed them out, thus you can use them as the center point. However, this requires the player to actually click on the text. The player must also be an OP in order to run the command. The /tellraw command can only run one command, which makes it even more useless for this purpose.
Thanks. I am thinking that it may be achievable through a bunch of scoreboard commands but I couldn't think of a way to do it.
so no /setblock primed tnt in a circle around the player? damn.
Not yet. I'm convinced that there is a way but I couldn't figure it out. They said it may be put in a later snapshot but I don't know.
Edit.
I just realized that that is exactly what id do with it for an adventure map. Make lots tnt fall in a line on either side of the player - isolating them - and then have a bunch of lights turn on more tnt fall in a circle around the player to put them on a pillar while the boss comes in.
If the player types it, it places it relative to the player....
We're talking about using command blocks to place it relative to a player. As far as we know, that's not implemented as of yet.
It's more for adventure maps and PvP servers, but still...
We're talking about using command blocks to place it relative to a player. As far as we know, that's not implemented as of yet.
It's more for adventure maps and PvP servers, but still...
Its meant to be like finding a way to make it work. Should I have put challenge in the description?
Well, there IS a way... Not particularly efficient though...
If you just modify this a little it should be possible.
Unfortunately this is nothing new, apart from the usage of the /setblock command. Any attempt to avoid countless /testfor commands would be preferable. As well, that setup is 'staged'; only those blocks can ever be affected by the machine. If the /setblock command could place relative to the player themselves, there would be no limit such as that.
I think at this point what Mojang really needs to do is just implement an in-game scripting language. (Javascript? Lua?) Possibly even with the option to execute an external script file similar to how you can now play arbitrary music files.
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
I was looking at this post and thinking about it myself and I found it. You may have seen some of those commands where it makes commandblocks fall from the sky. When they are falling they are technically entitys and you can teleport entitys to players using commandblocks.
In the first commandblock type /summon FallingSand ? ? ? {TileID:?,Data:?,Time:1}
Put a repeater coming out of the side with one tick going into another that has /tp @e[type=!Player,x=?,y=?,z=?,r=2] ?Player Name?
make sure the x y z coordinates are the same for both commands and the falling sand block has space beneath it when its summoned.
Typing something, for example /kill @e[type=!Player] basically means that the command excludes any entities mentioned behind the exclamation mark. In this case, it ignores any "Player" entities, meaning any players on the server.
If you are going to set the block somewhere near you when you come closer to specific block, then it can setback near you... i hope this is good for you guys
Thanks
There is no direct way to do this. The only way is to have the player click on /tellraw clickEvent text that contains the command. Commands run in this manner are run as if the player typed them out, thus you can use them as the center point. However, this requires the player to actually click on the text. The player must also be an OP in order to run the command. The /tellraw command can only run one command, which makes it even more useless for this purpose.
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/
Thanks. I am thinking that it may be achievable through a bunch of scoreboard commands but I couldn't think of a way to do it.
Not yet. I'm convinced that there is a way but I couldn't figure it out. They said it may be put in a later snapshot but I don't know.
Edit.
I just realized that that is exactly what id do with it for an adventure map. Make lots tnt fall in a line on either side of the player - isolating them - and then have a bunch of lights turn on more tnt fall in a circle around the player to put them on a pillar while the boss comes in.
That places the block relative to the command block, not the player.
If you want to talk privately, click me...
If the player types it, it places it relative to the player....
Yeah sorry. I forgot to say that it was with command blocks. It's fixed now. Thanks.
We're talking about using command blocks to place it relative to a player. As far as we know, that's not implemented as of yet.
It's more for adventure maps and PvP servers, but still...
Its meant to be like finding a way to make it work. Should I have put challenge in the description?
Probably not. I just meant that there's no "legit" solution as of now. Kind of like using /summon to place blocks before /setblock was created.
Unfortunately this is nothing new, apart from the usage of the /setblock command. Any attempt to avoid countless /testfor commands would be preferable. As well, that setup is 'staged'; only those blocks can ever be affected by the machine. If the /setblock command could place relative to the player themselves, there would be no limit such as that.
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/
/execute @e[type==Player] ~ ~ ~ /setblock ~ ~2 ~ stone
I was looking at this post and thinking about it myself and I found it. You may have seen some of those commands where it makes commandblocks fall from the sky. When they are falling they are technically entitys and you can teleport entitys to players using commandblocks.
In the first commandblock type /summon FallingSand ? ? ? {TileID:?,Data:?,Time:1}
Put a repeater coming out of the side with one tick going into another that has /tp @e[type=!Player,x=?,y=?,z=?,r=2] ?Player Name?
make sure the x y z coordinates are the same for both commands and the falling sand block has space beneath it when its summoned.
What does "[type=!Player" mean?
Typing something, for example /kill @e[type=!Player] basically means that the command excludes any entities mentioned behind the exclamation mark. In this case, it ignores any "Player" entities, meaning any players on the server.
If you are going to set the block somewhere near you when you come closer to specific block, then it can setback near you... i hope this is good for you guys
/execute @p ~ ~ ~ detect ~ ~-1 ~ grass 0 /setblock ~ ~-1 ~ air[/b]
This command will see if grass block is under your fit and if it is, it will change it into air block...[/b]