-1

I'm trying to set up a scoreboard for a king of the hill mini game but I can't seem to figure out how to increase the score of each player when they stand on the top of the hill. Can you output from the command block which player is detected on the cords, then use that player in another command block to increase their score? I'm really at a loss for how I could do this. I can't even seem to get the command block to repeatedly test if there's even a player on top of the hill.

0

What you said sounds like you would want to increase a score for every player on the hill every tick. But your use case sounds like it would be more helpful to tag a player on top of the hill and then stop doing things with him.

In any case you have to note the coordinates of the hill and choose a radius in which the player has to be. I'll use 12 34 56 as the coordinates and 7 as the radius (because I'm very creative).

The answer to your score question is then:

Init:

/scoreboard objectives add onHill dummy

Loop:

scoreboard players add @a[x=12,y=34,z=56,r=7] onHill 1

The way to do it with tags is:

(no init)

Loop:

scoreboard players tag @a[x=12,y=34,z=56,r=7] add won

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.