Skript

Skript

788k Downloads

Healthbar Type

Closed this issue ยท 3 comments

commented

Suggestion

A way to get the visual appearance of a player's healthbar.

Type - normal, withered, poisoned, frozen, absorbtion (all can have 'hardcore_' prefix applied for the hardcore version)
Expression - {player}'s health[bar] (type|appearance), (type|appearance) of {player}'s health[bar]

Example:

on region enter:
if region name is "tundra":
set player's healthbar appearance to hardcore_frozen

Why?

Useful for mapmaking when you want to set the visual appearance of someone's health.

For example, my server has cold areas where player's get hypothermia without the appropriate gear - I would like a visual indicator of the hypothermia by applying powdered snow hearts to the player's health, while being able to separately apply the damage so I don't have to abide by powdered snow's damage rate/amount.

Other

If possible it'd be cool to have a similar thing for setting the player's food meter to the variant when they have hunger, or to set a mount's healthbar type to something other than saddle hearts (or allow players to have saddle hearts)

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
commented

Not possible to add

commented

How so? wouldn't it just be sending the packets of the player's health type to them?

commented

How so? wouldn't it just be sending the packets of the player's health type to them?

There is no exact packet reserved for just heart type and Skript doesn't add syntaxes that require NMS as they require extra maintenance.
Most of those packets come with side effects like frozen hearts also adding a freeze overlay on your screen, poison hearts adding a fake poison potion effect to the player etc.
The heart type also need to be tracked internally if you want to retrieve their heart type later which comes with lots of edge cases