Progress Bar?

Hello all, I been working on a game for some time now and everything is ok so far but the progress bars made from UMG. Now with the basics they give you in umg is working with floats from 0 being Min and 1 being Max, problem is I have level progressions and want to work with bigger integers like 0-100 or 0-1000. I want to change to integers but as said the current progress bars in umg only go from 0-1, so how can I make a custom progress bar using integers or make it to where i can use whole numbers to do calculations on health instead of .00008 lol. I have searched all over and canā€™t seem to find any thing about it, Any help would be greatly appreciated thank you.

Mike

Progress Bar uses percent, which is why it is 0.0-1.0. You are over thinking your situation

Score Variable / Goal Variable = Goal Percentage
Current Health/Max Health = Health Percent

Have your text box display the INT values, the progressbar handles the percentage

Yep if you are working in base 10 then its very simple. If your max is 100 than 1=100, 0.5 = 50. If itā€™s 1000 than 1000=1, 500=0.5 so you should just have to update the max value of the progress bar for it to account correctly, just convert your current value to be the percentage of it too and it should just work.

Hey thank guys, im sorry im not understanding how i would hook this up or what nodes to use. Sorry just confused sounds simple but im lost.

just type ā€œ/ā€ and youā€™ll seeā€¦ a simple division would suffice

You donā€™t need to do any math;
Attach your health int (converted) to a float normalizer node and attach the output to the progress bar:


Actually, the explanation for that node in docs is poor; Confusing for non programmers.
Soā€¦ basically to do what you want to do, attach your HP to ā€˜Valueā€™ and your MaxHP to ā€˜Max Rangeā€™ and the normalizer node will return the exact 0-1.0 range that youā€™re looking for:

MaxHP being 1000 and HP value being 500 then node will return 0.5, that you then can just attach to the progress bar umg.

1 Like

Oh thank you so much I was trying and like you said node doc is really bare lol i knew their was a way just couldnt understand :slight_smile: thanks again for your help.