Display player's health with hearts (not numbers)

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

Hosom

Member
Jul 10, 2017
22
0
1
27
I am currently using SkRay fall.

I want to display player's health in the tablist (and maybe also under the player's nametag) using hearts, not numbers.

I tried this:

set loop-player's tablist name to "Test: &7(&c%loop-player's health%/10&7)"

But it displays like "(5/10)"

I want it to display with hearts icons :emoji_slight_smile:
 
code_language.skript:
"%loop-player's health% <3"

This?

lol :emoji_smile:

Nope, i mean actual minecraft hearts, like this
maxresdefault.jpg


Instead when i use %loop-player's health% i get this:

cXpXgkR.png


Also with your heart lol lol
 
Wait that's either a mod or something to do with command blocks, not sure tho never seen that!

It's a vanilla command block thing, but skrayfall overwrites everything that changes tab in vanilla. And I can't use it anymore since I installed it
 
I know what to do.
Either remove a chunk of your skript that modifies the tablist
Or:
remove skRayFall

Unfortunately the only script that changes tablist is this one that i made to replace the vanilla functionality since skrayfall overwritten it. And I can't remove skrayfall because I use it for a script with a lot of citizens NPC interactions. If you know a great alternative for spawning moving and despawning ncps with skript feel free to suggest :emoji_slight_smile:
 
You could make your own heart system (this is not optimized but it works)
Code:
on damage:
    set {_count} to round(victim's health)
    if {_count} < 10:
        set {_blank} to (10 - {_count})
        set {_final} to ""
        loop {_count} times:
            set {_final} to "%{_final}%&c❤"
        loop {_blank} times:
            set {_final} to "%{_final}%&7❤"
    else:
        set {_final} to "&c❤❤❤❤❤❤❤❤❤❤"
    #code to set the tablist
    #broadcast "%victim%'s health is %{_final}%"
 
Status
Not open for further replies.