0

So this might be confusing, but I'll try to explain the best I can.

I made an invisible maze (using barrier blocks) in Minecraft. I want to set up a score system that tracks the number of steps (using the "walkOneCm" stat) it takes a player to get to the end. I can set up the objective to track the steps and display them in the sidebar.

The only problem is it tracks all of the steps any player takes and I only want it to track people in the maze (it's circular with a radius of 16). I'm relatively sure this is doable, I just don't know how to target those players inside that circle.

Am I SOL or is this possible?

1
  • This sounds like it should be possible but I'm not sure, you'd want to reset the score to 0 at the beginning, clearly, but removing players from the scoreboard objective might be trickier. I'll look into it.
    – Unionhawk
    Nov 14 '17 at 20:48
2

You could reset that stat objective for anyone not within that radius. You would use a target selector with the radius minimum argument. I recommend putting the command block in the spawn chunk as it will never unload.

Command block is Repeat Unconditional Always Active with command:

scoreboard players reset @a[x=X,y=Y,z=Z,rm=16] [objective]

Where X, Y, and Z are the center of the maze and [objective] is the name of your stat objective.

The only problem with doing it this way is the sidebar display will blink on and off for the players outside the maze when they walk as the stat will increase and then be reset.

You could also set their score to 0 instead of resetting their score. This would prevent the sidebar display from blinking but players outside the maze would still see the sidebar.

2
  • That could work, though I'd prefer that there was no blinking. I thought about using teams. Placing a person in that radius on a team and tracking it through that, would that stop other players showing up on the sidebar? Nov 14 '17 at 21:45
  • This worked and the sidebar is not blinking. Thank you! Nov 14 '17 at 22:19

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.