Idk how to describe this... ¯\_(ツ)_/¯

  • 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.

NewbyZ

Member
Jan 26, 2017
75
2
0
25
Hi, I have a problem with this ...
Explanation: On my server there are bosses, and the health of the boss appears in the action bar.
So far so good if there is only 1 boss, but when there are 2 or more, it looks like this:
https://gyazo.com/2e6bf27b92110269b066f143c4feee03

How could I do it so that instead of going so badly, it would come out this way:?
a4bc2706874308781c3cb7c4d9c5bcf0.png

That is to say that if there is 1 boss, appear normal.
If there are 2 or more bosses, appear as the image.

(This is already optional but it would be fine):
At the moment the boss's life reaches 0, disappear from the action bar.

EDIT:

How can I do the same thing I asked for above but with countdown?
Like this (Action bar): 26s | 38s | 15s | 45s

code_language.skript:
function countdown(i: integer):
    loop {_i} times:
        loop all players:
            # This is the part that should be changed
            set action bar of loop-player to coloured "Bla bla bla %{_i}% seconds"
            # 
        remove 1 from {_i}
        wait 1 second

command /test:
    trigger:
        set {_time} to random integer between 10 and 59
        countdown({_time})


Thanks :emoji_grinning:
 
Last edited:
It’s hard to give you a specific answer without knowing how you have things set up but just do something along the lines of
code_language.skript:
set {actionbarText} to ""
loop {bossesPlayerIsFighting::%player%::*}
    set {actionbarText} to "%{actionbarText}%%loop-value%: %{health::%loop-value%}% "
 
Last edited:
It’s hard to give you a specific answer without knowing how you have things set up but just do something along the lines of
code_language.skript:
set {actionbarText} to “”
loop {bossesPlayerIsFighting::%player%}
    set {actionbarText} to “%{actionbarText}%%loop-value%: %{health::%loop-value%}% “
Again, I don't know why but you're using some kind of special quotes, kinda troll.
 
probably because i typed it on my phone idk why they wouldnt be normal tho. i blame skunity
¯\_(ツ)_/¯
 
probably because i typed it on my phone idk why they wouldnt be normal tho. i blame skunity
¯\_(ツ)_/¯
Welp, it's actually your phone using \u201C (Left quotation mark) and \u201D (right quotation mark) instead of the standard \u0022 (normal quoation mark), there are some weird phones that use them but I'd recommend you switching of keyboard.
 
It’s hard to give you a specific answer without knowing how you have things set up but just do something along the lines of
code_language.skript:
set {actionbarText} to ""
loop {bossesPlayerIsFighting::%player%}
    set {actionbarText} to "%{actionbarText}%%loop-value%: %{health::%loop-value%}% "

I think it's not what I'm looking for...

I will give another example that I also need:
How can I do the same thing I asked for above but with countdown?
Like this (Action bar): 26s | 38s | 15s | 45s

code_language.skript:
function countdown(i: integer):
    loop {_i} times:
        loop all players:
            # This is the part that should be changed
            set action bar of loop-player to coloured "Bla bla bla %{_i}% seconds"
            # 
        remove 1 from {_i}
        wait 1 second

command /test:
    trigger:
        set {_time} to random integer between 10 and 59
        countdown({_time})
 
Last edited:
Status
Not open for further replies.