I'm using UE4 and i can't figure out how to make the health and stamina only be between 0-100, how can I do that?
I think that this should help, despite me not being that familiar with unreal, https://answers.unrealengine.com/questions/296900/how-to-clamp-a-float.html
Not sure how to do it with Unreal Engine's stuff specifically, but the logic is pretty simple. Just create a function that takes in the value, a minimum value, a maximum value, and use if statements to return the proper value. Here's the gist in C++ that you should be able to copy and paste and use directly in UE4:
double Clamp(double value, double min, double max) {
if (value < min) value = min;
if (value > max) value = max;
return value;
}
Maybe this documentation could help, https://docs.unrealengine.com/en-US/BlueprintAPI/Math/Float/Clamp_float/index.ht...