Solved Current Health Of Mob

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

Qzan_

New Member
Jun 3, 2020
8
0
1
38
So I was wondering how I could make the name of the spawned mob to display it's "current health/max health" I figure out how to do the max health, but not the current health of the mob. Here's what I got so far:

on spawn of cow:
set health of event-entity to 10
set max health of event-entity to 10
set event-entity's name to "&cCow &8[&c%event-entity's health &8/ &c%event-entity's max health%&8]"
 
You need to update the name on damage:
Code:
on damage:
    if victim is a cow:
        set name of victim to "&cCow &8[&c%victim's health &8/ &c%victim's max health%&8]"
 
Status
Not open for further replies.