What is the difference between Custom Events and Event Dispatchers?

First off, what kind of events are these?

303554-events.jpg

Are they custom events, event dispatchers or something else?

I know what ue4 event dispatchers are. They are an implementation of the Observer (or Signal-Slot) design pattern.
But I’m confused as to what custom events are. What is their difference?
The only thing I understand about custom events is that they’re different from regular functions, they can have delays etc.

If somebody can shed some light on this very interesting topic for me I will be very grateful.
Thank you.

Thank you! You are right, I just corrected the typo, I meant “custom events”. I corrected the question (you can modify your answer as well if you want). However, you haven’t answered the main part of the question which is the difference between custom events and event dispachers (although my careless typo may be the cause of this).

First off, what kind of events are
these?

Event Dispatchers. Think of these as built in dispatchers inherited from the parent class. What you’re seeing on the list are their corresponding events. Let’s say you have an actor with a component that has an event dispatcher; you can evoke these calls automatically on the owning actors without any additional binding. And you can add your own, too.

What is their difference?
The only thing I understand about
event dispatchers is that they’re
different from regular functions, they
can have delays etc.

You meant Custom Events here, surely:

  • functions return values, custom events don’t
  • custom events can be replicated
  • custom events can use latent actions, like Timeline or Delay
  • functions have local variables

What is the difference between Custom
Events and Event Dispatchers?

In the context of Event Dispatchers: Event Dispatchers send data, and Events catch it.


Custom Events however don’t really fit into a question about event dispatchers. They’re custom, you create them and they can carry any signature. For example, trying to use a Custom Event with a Dispatcher:


In order to call an object’s Custom Event you’d need that object’s reference each time. Dispatchers’ events are bound once (but you can bind and unbind, and bind more than one event) and do not require a reference after that.

I was mistaken in thinking that there’s more magic hidden inside the “custom event” construct which makes them different from the “event dispatcher event” construct, but thankfully there is none! I dug up a bit of these in the C++ source and indeed there doesn’t seem to be anything else conceptually different. Thank you.

I’ll just add one thing to clarify. One can absolutely use manually created Custom Events with an Event Dispatcher but you must ensure that the signature on the dispatcher matches the event’s one.

All the dispatcher assignment does is to create a custom event with a matching signature and correct attribute names; Automagically so to speak.


If the question was: “What is the difference between the Event from the dispatcher’s event list (the original pic in the question) and a Custom Event”:

303586-annotation-2020-06-04-170014.jpg

The answer would be: It’s a shortcut. Apart from that there is no difference afaik; but you need to manually punch in a list of attributes if you’re not using automated assignment with the context sensitive blueprint wires.

That event list takes care of it all by making the events available in the owning actor and provides pertinent pins.