> For the complete documentation index, see [llms.txt](https://roogame.gitbook.io/roogame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roogame.gitbook.io/roogame/ultimate-stats-framework/creating-your-attribute-system/api-reference/events.md).

# Events

The `Ultimate Stats Framework Component` provides events for reacting to Stat and Attribute changes.

| Event                  | Trigger                                | Parameters                                         |
| ---------------------- | -------------------------------------- | -------------------------------------------------- |
| `On Stat Changed`      | Fires when a Stat value changes.       | `Stat Tag`, `New Value`, `Delta`                   |
| `On Attribute Changed` | Fires when an Attribute value changes. | `Attribute Tag`, `New Value`, `Max Value`, `Delta` |

<figure><img src="https://2218703886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4YPyrdOyfjDGtlxlvjSd%2Fuploads%2F32WLCAeod7iYbmLIMnoO%2Fimage.png?alt=media&amp;token=4d405e41-8e99-44f5-8f9d-a3208b7fdd14" alt=""><figcaption></figcaption></figure>

### Common Uses

#### On Stat Changed

Use this event to:

* Refresh a Stat panel.
* Update Attack, Defense, or MoveSpeed text.
* Update UI after HealthMax changes.

#### On Attribute Changed

Use this event to:

* Update a Health, Mana, or Stamina bar.
* Display current and maximum values.
* Check whether Health reaches `0`.
* Play damage or healing feedback.
