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"
gyazo.com/1c1e4be993f5d3b47e4b1202e9b57fa3
gyazo.com/317c13feab3e9ac87f821197e60a1d22
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.