Quickstart

For a basic scenario we need two objects: one expecting an event to happen - we call it Subscriber, other being an originator of this event - we call it Sender.

Subscriber

  1. Inside a class expecting an event, right-click anywhere on the event graph and search for Dispatchito Subsystem:

  1. Drag a pin off of the given label and search for SubscribeToTopic function:

  1. Press the dropdown for the Topic parameter and select desired tag for the topic of this event:

Learn about Gameplay Tags from official documentation.

  1. Drag from the Callback parameter and search for Add Custom Event:

  1. Name your event handler and add logic you want to be executed when the event is sent through Dispatchito:

We are done here. Let's now set up the sender of the event.

Sender

  1. Inside a class sending an event, right-click anywhere on the event graph and search for Dispatchito Subsystem:

  1. Drag a pin off of the given label and search for DispatchEvent function:

  1. Press the dropdown for the Topic parameter and select desired tag for the topic of this event:

That's all we need for this simple scenario.

Execution

Connect nodes to paths of execution in your code. E.g:

  1. Subscribe in the actor's BeginPlay function:

  1. Call DispatchEvent on a key pressed from a PlayerController:

  1. Start PIE, press the bound button and watch the magic unfold:

Last updated