Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I am Building an archery range in Minecraft. When the person Hits the bullseye, I want a command block command make them turn around (look away from the target). This is so they can't cheat and keep scoring by keeping the same direction.

share|improve this question
    
From a command block right below the shooter: tp @p ~ ~ ~ [heading] [pitch up/down]. Sorry, but I don't have the time at the moment to explain further. –  MBraedley May 23 at 21:05
    
I feel that having them look straight down is a nice alternative, likely with less dizzyness and player model spinning around. –  MrLemon May 23 at 22:09

2 Answers 2

up vote 7 down vote accepted

Yep, it's fairly easy to do too. This is probably the command you are wanting:

/tp @p ~ ~ ~ ~ ~180

The syntax is: X coord, Y coord, Z coord, Y rot (up and down), X rot (side to side). "~" means relative, so the player stays at the same coordinates, and turns around 180 degrees.

However this was only added as of snapshot 14w03a, which is after the 1.7 updates that most servers and players will be on at the moment. As an alternative, you may want to have them press a button behind them each time they score a point; I don't know how your range works so can't really detail that.

share|improve this answer
    
Ya forgot to mention the target in describing the syntax. –  James May 23 at 23:29
    
@James I meant just the order of the values, since there's no obvious difference between them. The full syntax is: /tp [target player] <x> <y> <z> [<y-rot> <x-rot>] –  colorfusion May 23 at 23:51
    
More information clearly explained in the area of question is always better ;) Just trying to help improve your answer. –  James May 24 at 1:05
    
This worked. Thank you! –  Josh May 24 at 11:08

There is indeed a way to do this with the new command blocks as mentioned by MBraedly. SethBling did a very nice cover of all the new command block neatness in one of his snapshot previews and shows one that makes you spin around. Find the video here:

The new features to the tp command are what you are after, about 4:30 in the video and it is as @MBraedley mentioned, adding in the heading and pitch values to it.

/tp @p ~ ~ ~ [heading]

The ~ are XYZ shorthand for where you currently are, for heading values use the ones displayed in the F3 overlay text. And I think that will take care of your needs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.