Durability System
Overview
The Durability system allows items to have a value-based lifespan, such as weapons or tools that degrade over time.
This example demonstrates how to display and manage durability using Item Properties and Visual Scripting.
Required Item Properties
To enable durability on an item, add the following properties to the Item asset:
Durability
Current durability value
Max-Durability
Maximum durability value
These properties are used to calculate and display the durability bar in the inventory UI.
UI Integration
When both properties are present:
A durability bar can be displayed in the inventory UI
The bar updates dynamically based on the current durability value
Reducing Durability
When using an item, you can reduce its durability.
Example
Subtract 1 durability each time the item is used
This can be done using Visual Scripting:
Get Runtiem Property Durability
Subtract value (e.g., 1)
Repairing Items
Durability can be restored through repair systems.
Example
Set Durability = Max Durability
This fully repairs the item.
You can also create partial repairs depending on your system.
Last updated