On event Questions

Does anyone know what this node from the custom event do?

1 Like

It’s for connecting to other nodes, like ‘set timer by event’ :slight_smile:

Ok so, Then that brings another question in, can i attach it to a dispatcher node? or what is that, ive heard of the dispatcher node, and i wanted to know if i would create a dialogue system could i attach this node to that?

Imagine the dispatcher as a switch and a couple of lightbulbs.

  1. Create the dispatcher in the Switch actor.
  2. Call it whenever something happens (for example, when the player presses the Space key).

For the Lightbulb actor:

  1. Get a reference to the Switch (using a public variable or the Get Actor by Class method).
  2. Bind a Custom Event that turns the light on to the dispatcher.

Whenever the dispatcher is called (that is, when the player presses the Space key), the Custom Event is triggered, and the lightbulb turns on.

  • dispatchers broadcast without knowing who is listening
  • custom events can listen to broadcasts
  • the red Output Delegate pin is used to register a custom event and make it listen to the broadcast
1 Like

This is an event reference (a pointer to a UFunction, which is essentially the event). It and dispatchers are made for each other, but you can come up with more complex (weird?) uses for it (especially using C++). :grimacing:

Here’s one of the less obvious (and possibly useless) use cases:


Local Wildcard node - can’t be created in event graph, but it can be copied from macro graph and it works.

1 Like

Thats really cool!

everything really helps with learning, i want to make my code as efficient as possible. Thanks everynone as well.

That’s… actually pleasantly confusing! Another unorthodox behaviour that is actually useful even though a bit of a fringe case:

2 Likes

Yes, this is also one of the non-obvious things (since when creating a pin, you can’t select the delegate type). And it’s also strange because it (drag-drop) doesn’t work for custom events (oh god why?).

So assuming that you bind the event to the function Like you are in your example, and when the custom pin/Funtion is fired from the -( lets say for an example from the Hud Blueprint itself )- then that should allow for any channel listening to it to fire their respective event that is listening on said channel?

Dispatching from the UI to actors is the most common implementation, yes. Once you create the connection (bind), it will persist - this needs to be done only once as opposed to using other communication methods. And will not give you grief if any of those entities cease to exist. They’re quite graceful.


I’d hate to confuse you, but I’ll have you know that you are already very familiar with Event Dispatchers. You must have clicked a button or hit a static mesh:


It’s the same thing. The binding is done automatically here, the button already belongs to the widget and the component to the actor. But those events can be executed elsewhere if needed. And new dispatchers can be added, too.

1 Like

i liked using this but i found it a little buggy, it would often forget the signature and have to be refreshed on startup.

since we’re adding tips you can actually pass a delegate by interface with c++ which allows you to decouple Event Dispatchers

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.