> For the complete documentation index, see [llms.txt](https://alexs-organization-34.gitbook.io/rednodeeditor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alexs-organization-34.gitbook.io/rednodeeditor/usage/custom-events.md).

# Custom events

**Custom events are special nodes which can alter the flow, allowing for a cleaner and more readable graph. They are also used to execute actions based on inputs deriving from an user interface.**

<div align="left"><figure><img src="/files/Pt9Abeu9wmicarwWBjlG" alt=""><figcaption></figcaption></figure></div>

## Using custom events

To create a custom event, add it as an usual node and give it an unique **EventName** (which will be id the caller will need to use to call it). To call the custom event, add a **CallCustomEvent** node and use the same **EventName** as the **CustomEvent** node.

<div align="left"><figure><img src="/files/bsXBvRfQYaKNQKlQN7nC" alt="" width="467"><figcaption></figcaption></figure></div>

{% hint style="warning" %}

* Custom events can't have the same **EventName**. Names must be unique. Failing in so results in a building error.
* **EventName** inputs are case sensitive. Always check if the two names correspond or use copy and paste to minimize the chance of typos. Event callers without a corresponding **EventName** will result in a building error.
  {% endhint %}

## UI custom events

Custom events are also used to receive inputs from user interface elements and execute an action with them. They can either receive a **boolean** or **single** (float) value.&#x20;

UI nodes passing a boolean argument are:

* AddCheckbox

<div align="left"><figure><img src="/files/IA8WjEvDQcECJfMIhoQt" alt="" width="563"><figcaption><p>checkbox ui node passing a <strong>boolean</strong> value to a custom event</p></figcaption></figure></div>

UI nodes passing a float argument are:

* AddSlider

<div align="left"><figure><img src="/files/hANd8UCgPViDAsxfANwX" alt="" width="563"><figcaption><p>slider ui node passing a <strong>single</strong> (float) value to a custom event</p></figcaption></figure></div>
