TransWikia.com

How can I make the compass point to a player?

Arqade Asked by Cụ Rùa on March 12, 2021

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.

3 Answers

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.

Correct answer by ash4fun on March 12, 2021

First, a quick note: this command does NOT WORK IN JAVA EDITION. As of 2020, the best way to do this is with a repeating command block set to always active and with this command set in it: /execute [insert prey gamertag] ~ ~ ~ setworldspawn ~ ~ ~. This will work, but you need to do 2 quick things in order for it to work 100% of the time. First, give the command /gamerule commandblockoutput false so that chat isn't constantly filled saying the spawnpoint was changed. Second, you need to set a ticking area around the command block. You'll need the coordinates for this. You need to use /tickingarea add [insert coordinates] [insert coordinates]. The ticking area must be the 3x3 area around the command block, with the command block in the center. Now just make sure the hunter has a large supply of compasses and set their personal spawnpoint near the command block to prevent them from respawning on top of you. Enjoy!

Answered by BeanGarbonzo on March 12, 2021

I solved all my problems with "/execute" there was an "@" after I think it was this . Basically I used a tag named Runner and made the world spawn wherever they were with a repeating_command_block it the command was something like this:

/execute @(/tag=Runner) setworldspawn ~ ~ ~. 

I hope this helps any one with a problem setting up an assassin vs speed runner world.

Answered by Moose14 on March 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP