Integer into progress bar
I'm working on trying to take my health (which is an integer) then converting it into a float for the progress bar:
however, when looking at the progress bar in game, it is either full or empty rather than going steadily down. any advice on how to fix the issue would be great! thanks,
asked Sep 05 '16 at 05:22 PM in Blueprint Scripting
Because you are doing the divide before turning the result into a floating point number, it is being returned as 0 instead of something like 0.25, as an example.
To explain more:
75 / 100 = 0.75 but because Health is a integer value, it will result in 0 (dropping the decimals because integer variables do not have any floating point numbers).
To fix this, you'll want to turn Health into a floating point number (float) before the divide. As such:
I don't think you need to divide to 100 to convert from an int to a float
answered Sep 05 '16 at 05:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here