Help with HP bar glitch

I’m currently making a game where you tap on monster to lower their health and there’s an hp bar to indicate the remaining health. The issue is sometimes it shows the monster has no health but then doesn’t go back to full health again. I noticed this only happens when you tap on the monster super fast since it hasn’t happened when I take my time. Here is a link.

8 Likes

I think I might of found part of the issue, this seems to be a visual bug. The HP bar displays the health as 0, while the monster still actually has health. I’m going to see if I can find a possible fix for you.

6 Likes

Ok thanks! All of the blue monsters should have the same health though. They should all take 20 clicks to destroy and all of the green ones should take ten.

6 Likes

I might have fixed it but there seems to be a new bug where the HP bar sometimes resets itself after a few clicks. If the project doesn’t show up for you it’s probably waiting to get approved.

6 Likes

The issue might be with the code you added to fix it, not 100% sure but if it seems to occur after you added it I would check there first. as once again this seems to be a visual issue with the health bar, and the health seems to work as it should. It appears to reset because the hp is still at previous monster, and when it hits 0 it reset the health bar again. Another thing I would like to point out is if you tap with multiple fingers at the same time it causes the health bar to glitch out as well. I will look into the code again see if there’s anything that I can fix the issue for you.

2 Likes

Ok thank you!

2 Likes

bump

@/StarlightStudios has this been fixed?

Oh yes it was fixed, thanks for asking though!

1 Like

@Pumpkin clive pls?

1 Like

let us know if the problem ever pops back up - and you’d like this reopened!