Jump to content

Recommended Posts

Posted

im trying to make a summon item which spawns a mob but i need to have a bossbar that is associated with the mobs health even though it is a zombie is this possible and how

Posted (edited)

On damage:

  If victim is named "&aZombie boss":

    Set {lastdamage.%uuid of attacker%} to now

 

    remove bossbar "damage.%uuid of attacker%"

    set {_health} to health of victim

    set {_healthmax} to max health of victim

    set {_healthmaxtot} to {_health} / {_healthmax} * 100

    create bossbar titled "&7&lZombie boss" and id "damage.%uuid of attacker%" for attacker with progress {_healthmaxtot} with colors red

 

    wait 10 seconds

    set {_waited} to difference between {lastdamage.%uuid of attacker%} and now

    if {_waited} is more than 9.5 seconds:

      remove bossbar "damage.%uuid of attacker%"

 

 

 

Just name the boss: &aZombie boss

Edited by Yo_The_pro19
Formating

 

350kb.gif.0ff78007b131dd46bab00eb5980d6c35.gif

Yo_the_pro19

owner of Aqua-lands.net

rank: VIP 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...