Download

Event Dispatcher Listening

Hey there!

While messing around setting up the HUD for the game I’m building I came across Event Dispatchers, which seem like a really useful way of communicating between objects in-game. So I’ve got a couple of questions…

My first question relates to the implementation in the Blueprint_HUD map in the content samples from Epic. What I’ve gathered from the documentation is that you need to have an instance of the object that dispatches the event in the ‘listener’ Blueprint so you can bind to your own custom functionality… but the level script seems to break this rule and I’m having trouble tracking down the link between the call to the event and the listener.

So the item you can pick up in the example has the following event (I added the TestEvent to try and replicate the functionality):

EventDispatchers.png

And then in the same Blueprint a call to the event dispatcher is made:

dc194f1a7b9fe84232888db09d46b39062c0c3aa.png

But in the Level Blueprint seems to be able to access this event without needing to bind to an existing instance of the pickup Blueprint:

5ed6357e8b9aaa7eaeceabccffacb5735266dfc9.png

My ‘TestEvent’ dispatcher doesn’t appear in any of the available nodes so there must be some kind of binding that I’m missing - but I can’t seem to track it down.

The second question I have is how did this level script get that *BP_Pickup_Child_Health *Actor instance?

Thanks in advance!

Well it looks like I’ve answered both questions :o

It seems like if I have an instance of the blueprint selected in the editor I get a context menu in the level script that lets me add in event processors… and the same goes for adding instance of said blueprint to the level script.

Sorry if I wasted anyone’s time!