Rounding an integer to it's hundredth place (like 124 to 100, 228 to 200, 348 to 300 etc.)

I have a growing integer (between 0 to 999), the integer is like a point system that grows as the player plays. I am trying to create a progress bar that tracks the point progression but the bar only needs to track 000-099 %. So if the player progressed from 490 points to 510 points the progress bar would go from 90% full back down to 10% full.

The progress bar currently works but maxes out at 100 and gets stuck there as the points rise. I was thinking of getting the point system and then rounding the point system to it’s hundredth place (so, 046 would be 0, 178 would be 100, 480 would be 400 etc.) and then subtract that with the point system. This would give me the effect I want but I can’t figure out the formula (or node) to round a 3 digit integer to it’s base hundredth number.

I basically want a progress bar that only tracks 0-99 even though the information it is being fed has an extra digit. Any ideas?


simply feed your progress the result of the following formula:

progress [percent] = 100 / MaxValue * CurrentValue

where MaxValue is 999 and CurrentValue whatever the player has at the time.

Have fun :slight_smile:

You could also use the mod node for what you’re trying to do I think (search for % if you’re using blueprints), which gives you the remainder of a division. So with integer divison 490/100 would be 4, but 490%100 would be 90 (the remainder), which gives you the percentage you want for your progress bar (510%100 gives you 10)

Thanks both of those worked.