Percentage of two Integers (Blueprints)

Okay so I am having a hard time for some reason trying to figure out the percentage of two integers.

I have a HEALTH float
A Current Hitpoints Integer
A Max Hitpoints Integer

I want HEALTH to = the Percentage of Current HP and Max HP

Basically What I am doing is I want to set a progress bar to equal the equivalent percentage of Cur HP and Max HP. So if I have 100 Max HP and my Cur HP is only 10 then my HEALTH would = .1 (10%) But for some reason I cannot get the results that I am looking for. Whatever Max HP is, I want to know the percentage of Max HP, Cur HP is equal to. I hope I explained that good enough. Thanks!

HEALTH = (Curr HP / Max HP) * 100

Dividing an INT by an INT returns the result without the remainder (21/22) = 0, even though we know it isn’t. You have to convert them to Floats to divide them properly, either by converting the Int to Float or by using Float variables to begin with, or by using Normalize to Range

1 Like

Thanks for the responses guys! The Normalize To Range was exactly what I needed! Thanks!