Clamping not required, use property "Value Range" instead

You don’t need to use clamping to make sure a float variable doesn’t go over a certain amount. The easiest way to do this without blueprint coding is to set the “Value Range” on the variable. In this case, Health should be a range from 0 to 100. This will ensure the player cannot go higher than 100 health.

1 Like

I believe this is not correct, because we need Max Health to be a variable. At some point it could change, and clamp would work as it is. This manual setting though should be changed again.

Privacy & Terms