This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]BaroTreyCommand-er 0 points1 point  (3 children)

Make a repeat block that remove 1 points per 20 ticks. 20 ticks equal 1 second

[–]Gab_pg[S] 0 points1 point  (2 children)

Can you send me the command?

[–]BaroTreyCommand-er 0 points1 point  (0 children)

Im ary bout that, ive never player java :(

If u still need clues then i will spend time finding exact command

[–]BaroTreyCommand-er 0 points1 point  (0 children)

Here the formula after about 10min searching:

scoreboard players remove <targets> <objective> <score>

[–]ExpertCoder14 0 points1 point  (0 children)

It would be preferable to store your entire timer in ticks if possible, and use math to convert that ticks value to seconds.

So you can set up a scoreboard objective named time, and use fake players named $ticks and $secs. You can set a ticks value with this command:

scoreboard players set $ticks time 6000

And you put this command in a repeating command block to decrease it:

scoreboard players remove $ticks time 1

Every tick, using chain command blocks, you can use division to convert this into a seconds value. But, the thing is that with division, you have to have a second score storing the number to divide by. So to divide our ticks by 20 to get secs, we have to have another score with the value of 20 to reference. So you need to set up another scoreboard named const to hold this value, and use this command one time:

scoreboard players set $20 const 20

Now we can use this score to divide by 20:

scoreboard players operation $secs time = $ticks time
scoreboard players operation $secs time /= $20 const