Bossbar countdown

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
47
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:
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?
 
Status
Not open for further replies.