Hey there,
I started working with bossbars, and I thought it would be cool to make a bossbar countdown.
After some testing, I ended up with this peace of code:
The problem is, that I cant get it to work the way I want it to.
I want that if I run the command /countdown, and set arg-1 to like 5 seconds, the bossbar will show up and start getting down for the 5 seconds until its finished and disappears.
Can people help me with this?
I started working with bossbars, and I thought it would be cool to make a bossbar countdown.
After some testing, I ended up with this peace of code:
Code:
command /countdown [<number>] [<text>]:
trigger:
create bossbar titled "%colored arg-2%" and id "%arg-2%" for player with progress 100 with colors blue
loop 100 times:
set bossbar "%arg-2%" value to (100 - loop-number)
wait 1 second
remove bossbar "%arg-2%"
The problem is, that I cant get it to work the way I want it to.
I want that if I run the command /countdown, and set arg-1 to like 5 seconds, the bossbar will show up and start getting down for the 5 seconds until its finished and disappears.
Can people help me with this?