Can I Change the Health Bar?

Started by Jacko22 on

Topic category: Help with MCreator software

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I Change the Health Bar?

So in the link below I've got a simple procedure which changes the player's health to 100 (ignore the other one, that was for a different post). I just want to know if there is a way to change the obstructive vanilla health (that fills up the screen once it goes past 20) bar to something more streamlined that can portray all 100 HP.

https://imgur.com/a/iomJczz

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's not letting me post a…
Fri, 05/22/2026 - 04:19

it's not letting me post a reply?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sprite: Editor (stack of…
Fri, 05/22/2026 - 04:23

Sprite:

Editor (stack of individual pictures):

In-game (haven't overridden the heart texture yet):

Importing issue (.gif method):

Importing issue ("animation strip" method):

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why are you trying to import…
Fri, 05/22/2026 - 11:49

Why are you trying to import as an animated texture. You just import it as a regular .png in the gui section of resources. Just a single png containing all of the bars from 1/100 to 100/100. A massive image that looking at yours will be longer than wider. 

Cannot see 1st and 3rd image, but either way just make it a single png in whatever software you use. Then import it, select it as your sprite image within the gui when making a sprite.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oops here are the two that…
Sat, 05/23/2026 - 03:49

oops here are the two that disappeared:

and

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For the first image that is…
Sat, 05/23/2026 - 16:24

For the first image that is correct for the sprite png so just import it into the gui resources and select it as your sprite in the gui element.

The second part, did you lock the sprite/image to the bottom middle or the middle. If you did then try locking it to the bottom left and see how that goes, change the gui scale to check it all.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just for clarification could…
Sun, 05/24/2026 - 04:06

Just for clarification could I see what the full procedure looks like to display the different images of the sprite (using your example of a sprite with 4 levels)?  

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I already sent it before:…
Sun, 05/24/2026 - 09:42

I already sent it before: https://imgbox.com/hb2HZtRZ

You simply change the 10 to the number of sprites within your sprite image/sheet. So for the 4 level sprite you would put 4 instead of 10.

The reason for the (10- ...etc) is because I put the full bar at the top of the image, which would also be true for your health bar sprite I saw from earlier, if your empty bar was at the top and full bar at the bottom you would not need this 10- part.

Replace the 10 with the number of sprites, that will also be the number you put into the sprite element when you make it in your gui.

You can use this same return number equation for any sprite using a current and max value.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So you just attack this to…
Sun, 05/24/2026 - 19:13

So you just attack this to the trigger block?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I got it working, however…
Sun, 05/24/2026 - 20:11

I got it working, however the poison and wither overlays render below the main HP bar no matter where I put them in the order on the side.

E. G.:

Editor:

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You should use a display…
Sun, 05/24/2026 - 21:08

You should use a display condition in order to only display one of the bars at a time. Make it so the base health bar is only displayed when entity has not effect poison or effect wither. 
Then on the poison only show when poison is true and wither is false and the opposite for the wither condition.

Display condition are just return logic: same ones as before like the previous one.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The way I did it is so that…
Mon, 05/25/2026 - 01:20

The way I did it is so that the poison and wither are semi-transparent overlays instead of replacement bars. would there be a way to use that and still not have my issue?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I guess you can do that But…
Mon, 05/25/2026 - 06:18

I guess you can do that

But then you need each one to have a separate overlay element so that you change the render priority of the transparent ones to be later than the basic health.

Also you need display conditions for the poison and wither either way so you may as well do it for the health.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright so I got the overlay…
Wed, 05/27/2026 - 03:07

Alright so I got the overlay fully working (I just made the poison and wither 1-frame sprites) but I have one more problem, it is cutting off each individual frame of the sprite one pixel too short. Do you know how to fix this?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have you set the number of…
Wed, 05/27/2026 - 07:16

Have you set the number of sprites correctly?