> For the complete documentation index, see [llms.txt](https://asperazera.gitbook.io/ultimate-event-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asperazera.gitbook.io/ultimate-event-system/quickstart/receive-event.md).

# Receiving Events

To react to an event (open a door, update the UI, play a sound), a Blueprint **subscribes** to the event bus using the **Subscribe** node.

<figure><img src="/files/omI1xhIfkIDq296x65Gw" alt=""><figcaption></figcaption></figure>

> 📍 **Where to put this?**\
> The best place to subscribe is usually **Event BeginPlay** (for Actors) or **Event Construct / On Initialized** (for Widgets).

***

### Step 1: Add the Subscribe Node

1. Open the Blueprint that needs to listen (e.g. your HUD Widget or an Actor).
2. Right-click on the graph and search for **"Subscribe"** (category **UES**).
3. Place it after **BeginPlay** (or your init event).

<figure><img src="/files/T7Y0W3cz9TgnLBEmEDGl" alt=""><figcaption></figcaption></figure>

***

### Step 2: Choose Which Tags to Listen For

By default, **Subscribe to All Events** is `False`, and the node shows an **Events** pin.

1. Click the **Events** dropdown and tick one or more tags you want to hear (e.g. `Event.Player.Death`).
2. That's it - this subscriber will only react to those tags.

{% hint style="info" %}
**Note:** The `Events` pin is a **Gameplay Tag Container** (it can hold several tags). You can also drag a single **Gameplay Tag** onto it - the editor inserts a small `->` converter automatically.
{% endhint %}

<figure><img src="/files/H78QXJs8c8N3L1y1Q0cd" alt=""><figcaption></figcaption></figure>

***

### Step 3: Create the Callback

Now tell the node what to run when the event fires.

1. Drag off the **Callback** pin.
2. Choose **Add Custom Event** or **Create Event** and give it a name (e.g. `OnPlayerDeath`).

UES automatically creates the Custom Event with the correct signature - three output pins:

* **Sender** (`Object`) - who sent the event.
* **Event** (`Gameplay Tag`) - the exact tag that fired.
* **Payload** (`Instanced Struct`) - the attached data, if any.

<figure><img src="/files/84rJ7jx8hIp79c4aabaM" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CXYL5NoazLkON7d26aOI" alt=""><figcaption></figcaption></figure>

***

### Step 4: Add Your Logic

Connect your gameplay logic to the Custom Event.

**Example:**

* **Tag:** `Event.Player.Death`
* **Logic:** Print String `"Player died!"`

<figure><img src="/files/esRvsW7XK1PCOjYymYvy" alt=""><figcaption></figcaption></figure>

***

### One Handler for Everything (optional)

Set **Subscribe to All Events** to `True` and the `Events` pin disappears - your callback now receives **every** event on the bus. Read the incoming **Event** tag inside the callback to decide what to do. This is handy for loggers, analytics, or a central UI manager.

{% hint style="warning" %}
**Remember to clean up.** When your Actor or Widget is destroyed, unsubscribe so the bus doesn't keep stale entries. Call the **Unsubscribe** node on **End Play** / **Destroyed**. See [Unsubscribing & Lifecycle](/ultimate-event-system/advanced/unsubscribing.md).
{% endhint %}
