0

I am making a points shop for kills. I have the objectives money and kills. When I press a button, a command block tests for my kills (hopefully) above 0, and if that is a thing, it takes gives me one money and takes one kill. But this never happens because it always "Finds" me, and now my kills are in the negative.

TLDR: How to /testfor a number only above zero?

1 Answer 1

1

A good way to do this is to have it when you press the button, for something costing 3 'points', have a command block with the command /testfor @p[score_TEST_min=3] This will make it so the minimum score you can have is 3. So, if your score is smaller than 3, it can't take away points.

Remember, it can be any number, just substitute the number 3 for the number of points something costs. Lead a redstone comparator out of that command block, and to the command blocks that take the 3 points away from you, and give you the item(s). (I'm assuming you already have the commands for these, if you don't, leave a comment, and I will add them.)

1
  • But... Does it? I tried that.
    – anon
    Commented Jan 22, 2016 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.