Skip to main content

Clamping

Clamping allows you to have a Minimum and/or Maximum value for your Stat. It can either be a flat value (a value that will always remain the same) or a link to the Final Value of a Complex Stat.

Whenever the value of a Stat is modified, Clamping is applied and the result is the Final Value.

Any Stat can have a Clamping method in its details panel.

note

In this example for my Health Stat, its Minimum is a flat value of 0 and its maximum is a link the value of HealthMax (a Complex Stat).

Functions

You can find clamping related functions in the "Clamping" category in the functions browser.

Delegates

You can bind to OnReachedMinimum and OnReachedMaximum delegates. When the Clamping is applied, they will trigger whenever the value falls below the Minimum Value or exceeds the Maximum Value.

warning

In a networking project, these delegates might be called on the Client before the Stat values are in sync with the Server, so make sure to use the values provided by the event.