1

Command help

Mithril1Blade's Avatar Mithril1Blade10/7/15 6:45 pm
1 emeralds 347 9
10/8/2015 2:12 am
TheArchitect_95's Avatar TheArchitect_95
I'm creating a minigame, and I want to have a command block hooked up to a clock that teleports a villager 10 blocks below me so I can control him. I tried using /execute, but I can't figure out how to do what I want. Any help please?
Posted by Mithril1Blade's Avatar
Mithril1Blade
Level 12 : Journeyman Engineer
8

Create an account or sign in to comment.

9

1
10/07/2015 8:59 pm
Level 50 : Grandmaster Pixel Painter
Sardonyx
Sardonyx's Avatar
This should work, it is a bit round-a-bout, but I can't think of any other way to do it
Put all these commands on a /fill clock, so they activate in this order:

/execute @a ~ ~ ~ /summon ArmorStand ~ ~-10 ~ {CustomName:"placeholder",CustomNameVisible:1,Marker:1b,NoGravity:1}

/tp @e[type=Villager,name=example] @e[type=ArmorStand,name=placeholder]

/kill @e[type=ArmorStand,name=placeholder]

If you need help with getting them in the right order, you can use this one command generator: http://mrgarretto.com/cmdcombiner

I haven't actually tested it, but I am pretty sure the syntax is right, so it should work.
1
10/07/2015 9:10 pm
Level 12 : Journeyman Engineer
Mithril1Blade
Mithril1Blade's Avatar
That's a good idea. I'll give it a shot. Thanks.
1
10/07/2015 9:34 pm
Level 50 : Grandmaster Pixel Painter
Sardonyx
Sardonyx's Avatar
Happy to help!
1
10/07/2015 8:33 pm
Level 52 : Grandmaster Pixel Painter
craftykids
craftykids's Avatar
One way you could do it is by using two commands; one to teleport the villager to you, and one to teleport it 10 blocks below itself. You'll have to position the command block correctly, though. (So that the first runs before the second, I guess?) I didn't experiment a whole lot with single commands, though, so there might be a way to do it with only one command.
1
10/07/2015 7:48 pm
Level 63 : High Grandmaster Hero
Runninlikcraz
Runninlikcraz's Avatar
Depends what the minigame is, if you are planning to have multiple players playing then you would have to make a different villager for each player. Set player one's score to 1, player two's to 2 etc.
then /execute @a[score_Team(or whatever scoreboard objective you have)_min=1,score_Team=1] ~ ~ ~ /tp @e[type=Villager,name=PlayerOne] ~ ~-10 ~
1
10/07/2015 8:03 pm
Level 12 : Journeyman Engineer
Mithril1Blade
Mithril1Blade's Avatar
That moves the villager to a position relative to him. I need to move him to a position relative to me.

And it's only one player, but if I want to change it later, I will.
1
10/07/2015 7:06 pm
Level 32 : Artisan Architect
TheArchitect_95
TheArchitect_95's Avatar
The villager has to be unique, either a custom name or scoreboard objective usually works. Let's assume the villager is called Bob. The command is:
/execute @p ~ ~ ~ tp @e[type=Villager,name=Bob] ~ ~-10 ~
1
10/07/2015 7:21 pm
Level 12 : Journeyman Engineer
Mithril1Blade
Mithril1Blade's Avatar
That teleports Bob to 10 blocks below Bob, which, on a clock, would shoot him into the void pretty quickly. I'm not talking about controlling him with pressure plates- I mean teleporting him below my constantly, so if I move to the right, he moves to the right ten blocks below me.
1
10/08/2015 2:12 am
Level 32 : Artisan Architect
TheArchitect_95
TheArchitect_95's Avatar
Ah yes, my apologies.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome