Closed CharGoldenYT closed 6 months ago
this "bug" happens due to the graphic being placed behind the healthbar. to fix this you need to make a script adding it to the front of the healthbar. (im saying "bug" because its not actually a bug but intended)
var healthBorder:FlxSprite;
function postCreate() { healthBorder = new FlxSprite(340, 648).loadGraphic(Paths.image('game/youthealthbar')); healthBorder.cameras = [camHUD]; insert(members.indexOf(iconP1), healthBorder); healthBorder.scale.set(1.01, 1); add(healthBorder); }
put this in "data/states/playstate.hx"
this "bug" happens due to the graphic being placed behind the healthbar. to fix this you need to make a script adding it to the front of the healthbar. (im saying "bug" because its not actually a bug but intended)
oh ok. i think i get why
var healthBorder:FlxSprite;
function postCreate() { healthBorder = new FlxSprite(340, 648).loadGraphic(Paths.image('game/youthealthbar')); healthBorder.cameras = [camHUD]; insert(members.indexOf(iconP1), healthBorder); healthBorder.scale.set(1.01, 1); add(healthBorder); }
put this in "data/states/playstate.hx"
and also thanks for the script everything is layered correctly now
Which target are you using?
[x] Windows [ ] Linux [ ] Mac
Explain your issue
Basically putting a custom healthbar in mods/(insertfoldernameforthemod)/images/game/healthBar.png causes the healthbar colors to incorrectly display ABOVE the image as opposed to below it. it also occurs with assets/images/game/healthBar.png and replicating the internal vanilla healthBar.png's filled in the middle with white (i assumed it was a masking problem based on that) doesnt change it
Please check first if your issue haven't already been reported yet.
yep the only mention of healthbars previously were about the color support (note i am doing a thing to learn the engine atm so its using ourpleV3 assets lol)
Broken Healthbar in Codename
what its supposed to look like
hopefully i explained it well enough
Extra note that behaviour is also displayed in this video: https://youtu.be/z2WT4jSBZdE?t=82