So I read this post that I found through a google search:
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.
Any help would be greatly appreciated!
where did u create the event dispatcher?
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
if the event dispatcher was made inside the character BP, then all you have to do is cast to node and hookup the dispatcher event
The Bind is in my BP_UI and the call is in my level BP.
BP UI is a widget right?
I have a better method for you, but its like a whooooole re-construction to your blueprints and will get the job 100% done.
either you can MSG me on private and tell me what you are building so I can help you or you can wait until somebody gives you a simple work around.