How to customize a progress bar object?

  • Hello, I'm a bit familiar with usual functions of Construct 2, but I can't get around customizing a progress bar. I see that it's a common thing in games, but I have no idea how to make a progress bar look the other way. For example, it could be colored like rainbow, starting from red and ending on purple, that kind of line. But how do I actually change the sprite of the progress bar? It's a vital part of the game I am making.

  • Don't use Progress Bar object. It's very easy to make a custom progress bar with a sprite or TiledBackground. Simply change its width, for example:

    ProgressBar set width to (Self.ImageWidth*progress)

    where progress is a number from 0 to 1.

  • Thank you kind sir/ma'am! I will try it soon and respond as a reply if I have further questions about it, or if something wouldn't work. ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't use Progress Bar object. It's very easy to make a custom progress bar with a sprite or TiledBackground. Simply change its width, for example:

    ProgressBar set width to (Self.ImageWidth*progress)

    where progress is a number from 0 to 1.

    Sorry for a late response! It seems to be kind of working, but no matter what I do, the right side of the progress sprite gets faster than the left side. I used a timer for 5 seconds for this one, and it starts as a 5 second timer, then I use:

    System > Every tick > (Progress Bar) Set width to: Self.ImageWidth*GrowProgress.Timer.TotalTime("5") <-- Just a tag

    My main effort is to fit the progress bar in the frame for it that exists as another sprite, but it just looks unnatural if the other side gets longer faster than the other one...

    I'll be very glad if you help!

  • Check the origin point position in the progress bar sprite. If you want it to grow from left to right, than Origin image point needs to be set at X=0.

  • Check the origin point position in the progress bar sprite. If you want it to grow from left to right, than Origin image point needs to be set at X=0.

    Thank you so much, everything works!! Good luck in your work!

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