Attributes
Attributes are objects that represent a numeric trait of a character, but its value is clamped between a min/max range.
Common Attributes The most common attribute is the
health
of a character. Its value could a value clamped between 0 and 100.
Property
StringName id: The ID value must be unique throughout the whole project.
Float min_value: The min value.
Stat max_value: The Max Value comes from a Stat as this value can change at runtime.
Max Value is a Stat For example, if the attribute represents the health of the player, levelling up could increase the maximum health. In this case, increasing a Stat called "Max_Health" would automatically increase the max cap of the health Attribute.
Create an Attribute resource
By FilesSystem
Right click on the file system and select "New -> Resources", search "Attribute":

By GDScript
like this:

Last updated