Get float with max value?

Hello,

i get a dynamic float and i want to store that float in a variable but it shouldn’t get higher than 2. (in blueprint scripting)

p.s. Sorry for my bad english

When you select float variable in property editor “slider range” and “value range”.

Slider range - minimum and maximum values that you can set with slider (that will apper when you set a range) in property editor

Value range - minimum and maximum values that you can set with text field in property editor

Things is those are only for property editor, there no way block ability to set float manually to any value using Set node, you need to program such a limitation with clamp node for example.

But again this ofcorse won’t prevent anyone to manually set variable to any other value, but you can gate keep it by making variable private and make a function that will set the value passing thru clam node so if somebody sets value higher then 2 it will clamp it back to maximum value.