It got me a little closer to understanding event dispatchers, but I can’t seem to get this to work.
I’m trying to make a UI widget appear when my player overlaps with a triggerbox. I’ve attached some screens of the scripts.
The problem I think I’m having is with the target in the caller, it says that PB_UI is out of scope and the only thing i know in regards to that is maybe casting it to PB_UI.
it says PB UI Reference. so it needs the UI reference hooked up into it
now of course you made the widget populate with created widget node…?
you know what… I want you to show me all of your blueprints so I can help you, from the creation of the PB UI until that spawn event you want it to show on your UI.
Target is the instance of the Actor and without a target reference it will not know which instance/target it should call the Event Dispatcher on.
To keep things simple the Caller of the Event Dispatcher should also be the owner of the Event Dispatcher.
Those who want to Bind (listen) to the Event Dispatcher needs a reference to the owner of the Event Dispatcher.
Move the Event Dispatcher onto the Actor that needs to Call the Event Dispatcher and have it Call itself when it overlaps (like you already do).
On the Widget you need a reference to the Actor that Calls the Event Dispatcher so that you can bind to that specific instance.
I have 3 blueprints. “ThirdPersonExampleMap.jpg” is the level BP and the other is my PB_UI blueprint. My third blueprint is called Debuffs and it just has some UI elements. Here’s a screen just for information sake. I tried using a cast but I get a warning