How do I stop sprite width

0 favourites
  • 4 posts
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • 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.

  • Have you tried not updating the bars width until after you have adjusted the value?

  • Have you tried not updating the bars width until after you have adjusted the value?

    Is it because I have this on System>Every tick? If this is the problem, what do you suggest I change it to?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Construct reads events from top to bottom..

    your event adding 10 is beneath the event setting it back to 100 if above 100..

    change the order of these events and all should be ok..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)