Started by
Jacko22
on
Topic category: Help with MCreator software
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.
it's not letting me post a reply?
Sprite:
Editor (stack of individual pictures):
In-game (haven't overridden the heart texture yet):
Importing issue (.gif method):
Importing issue ("animation strip" method):
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.
oops here are the two that disappeared:
and
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.
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)?
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.
So you just attack this to the trigger block?
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:
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.
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?
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.
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?
Have you set the number of sprites correctly?