Following some exp/health bar guides, I have done so in which I determine the top bar's width by "(current/max)*bottom_bar.width"
This GIF shows what my problem is, it doesn't capture it properly, but right at the end, it shows the green bar extending beyond. From the screenshot, you can see I tried to to set the counter1 to 100 when its value => than 100. The problem is that it goes beyond 100, thus the bar's width extends accordingly, then the value is set back to 100, and the bar shrinks accordingly. How do I fix this?
Note: This happens very noticeably, and all the time, the gif just didn't capture the bar extend properly.