0
Answered

Can make the stats between a certain value.

Link 4 months ago in Stats updated by Matthew Bockholt 3 weeks ago 3

Can make the stats between a certain value.

For example, I want the stats to be greater than 0 and less than 100. I know that the formula can use max[] and min[]. How to make them effective at the time?

Unity version:
1.1.8
Game Creator version:
2018

I also found that this [value] will continue to increase or decrease under the formula using max and min. If I want to use the display stats value for calculation every time. How to do?

Answered

If you want to cap the stat value, as you say, use the min and max symbols. Something like this:

max[0, min[100, this[value]]]


This will keep the value between 0 and 100. Even if this[value] increases over 100, the stat value will be 100, so you don't have to worry about that.

Just so you know, this only changes how the Stat is displayed, not calculated. If you keep adding to the stat, it will keep increasing, somewhere behind the scenes. So if the Stat hits 101, it will only show/use 100, but if you subtract 1 from that Stat, it will still show/use as 100, until you subtract another 1. I have tested this out extensively, it works on both min and max! I should probably make a bug about it...? Or is it working as intended?