how can i make a system thats detect if a scoreboard value change in minecraft 1.15.2/1.16...

if i have a scoreboard called totalkills and if the scores increase by one how can i detect that? i know you can have a repeat command block running /execute if enity @a[scores={totalkills=1..}] run scoreboard players set @a totalkills 0 and then have a chain commandblock thats detect when that happens… but i dont want to reset the totalkills score everytime.

i read this question but it didnt workt for me i think it was to old or something --> How do I detect if the scoreboard value has changed?

sorry for bad English, thanks for reading :)

  • who gave my a down vote and didnt left a comment why? – zombie1111 Apr 17 at 17:53
  • Maybe random, maybe having a bad day, maybe because of your mentioned "bad English" (which is fine in my opinion). – Fabian Röling Apr 17 at 21:47

The basic answer is: You don't.

Scoreboards values are like variables, they are meant to be written and read, but a change in them doesn't in itself trigger anything immediately.

You could increase a second scoreboard whenever the first one is at 1, because you decrease the first scoreboard, or, much easier:

Create a second scoreboard of the same type. You use one for detection and set it to 0 every time, like you already do, and the other one you just leave how it is, so that it shows the total.

| improve this answer | |
  • 1
    okay thanks but that have i already done. i only wanted to know if it exists a better way to do it. – zombie1111 Apr 22 at 18:44

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.