5

I want to make a hunting Minecraft map, and each hunter has a tracking compass that points to the nearest player. My friend said that I need a plugin or mod (I don't know what a plugin is!). The plugin thing seems to be complicated so I want to know if there's a way to do this with commands only.

I tried setting spawnpoints of the hunters to the hunted but this only works if the hunter dies: next time they respawn, the compass points to it but only where the hunted stood when the hunter died.

  • 2
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Mar 4 '16 at 12:54
  • 2
    uhm... i have: set new spawnpoint repeatedly. and i see this comment of you like for 1 billion times! I know that it is better not to rely on others, you should try your way out first but the thing is I HAVE TRIED MY BEST IT TOOK ME 3 DAYS THINKING AND TESTING!!!! – Cụ Rùa Mar 4 '16 at 13:34
  • 2
    @Frank he did try something, even though he did not post the commands he used. I assume it was something like running /execute @a[team=hunted] ~ ~ ~ /spawnpoint @a[team=hunter] ~ ~ ~ – MrLemon Mar 4 '16 at 13:45
  • Wow... Exactly. I connect it to a fast redstone clock,so that the hunted's location could be updated. But, as I have mentioned before, the compass only updates when the hunters respawn. – Cụ Rùa Mar 4 '16 at 13:54
  • Adding in what you have tried is important. Otherwise, we might be retreading the same ground you've already gone over. – Frank Mar 4 '16 at 13:54
2

I checked, and /setworldspawn does change the compass immediately. Try running on a clock:

/execute @p[team=hunted] ~ ~ ~ setworldspawn ~ ~ ~

if you encounter any problems, please leave a comment and I will look into it.

  • @ash4fun I think you should use @a instead of @p – RudolfJelin May 21 '16 at 17:37
  • @RudolfJelínek There can only be one worldspawn, so it doesn't make sense to set it to more than one person. @r should work though. – ash4fun May 23 '16 at 20:35
  • @ash4fun I just said that because there were problems with @p[something] in older MC versions :D – RudolfJelin May 24 '16 at 13:24
  • @RudolfJelínek Problems in older versions are irrelevant because /execute was introduced in 1.8 and there are no "issues" with @p. – Skylinerw May 24 '16 at 13:51
  • @Skylinerw I'll remember that for further answers – RudolfJelin May 24 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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