Download

Button clicks trigger event dispatcher calls but not custom events?

So I finally got a dispatcher to work, but it only works when its triggered from a button click?

Random custom events wont trigger the call…

Any ideas?

Thanks!

Ya I just tested it again, a custom event actually will fire a call for an event dispatcher…but only if a button click is used to call the event from within the same BP.

Im trying to call an event in another blueprint, and then off that execution call an event dispatcher… and es no bueno.

Could you post some images of what you’re talking about? How are the custom events you are using to call the event dispatchers being called?

This works amazing:
c9df2f61ddae4d13521d8e73baca374aaa05b445.png

If I hit that button the event dispatcher makes the call to my bound events.

This works Swell as well.
12c10980a7a13255f2387f3a68623c8845528631.png

If I click the button, to call Test Event 1, Test Event 1 will fire and the dispatcher will call.

This does absolutely nothing.
c652aa7bc025000b59887162e2441b18e06a8859.png

Test Event 1 is being called from another BP. Even though I have confirmed through the print string seen “Hello2”, that Test Event 1 is firing just like the second image, the dispatcher refuses to make a call.

Thanks for your help

Everything seems fine there, could we see where Test Event 1 is being called in the other blueprint, and what is on the other end of the event dispatcher please?

Sure thing m8, thanks again

Here is where its being called in the other widget.
80e53ea671594ae9f72c082222d667803c6c0c70.png

And on the other side of the Dispatcher:
ed48099f7ffec203dbe18ea13307376f6790858b.png

I realize Im creating widget 1 twice but that seems to be the only way I can get the Bind Event Node to work

Also, again, I realize creating a widget in a widget is weird, but, again, it seems to be the only way I can get the dispatcher to work.

Maybe Im just dense when it comes to references but the dispatchers dont like my reference unless they are first created from within the very blueprint I need them in.

You are sending the event to the widget that isn’t connected to the event dispatcher binding event.

In widget_2 you create a widget_1 and set it to Widget 1 Ref. You then call the event on that invisible widget_1.

In actor you create another widget_1, this time visible, and set it to New Var 3. You then bind it to the event dispatcher. Because you’re not calling the event on the widget that is hooked up to the dispatcher it won’t work. Basically nothing calls the custom event on the widget that is hooked up.

When you call the event in widget_1 with self it works fine because the event is actually getting called on the visible widget_1 that is hooked up to correctly.

What I would suggest is to move the widget creation stuff into the player controller, because you can always get a reference to it by doing Get Player Controller. That way you don’t need multiple widgets of the same type (you don’t need that now either but anyway). Set up a variable there and get that reference in the actor or whatever and you should be able to call it assuming you hooked up the binding in the player controller too.

I tried m8

So I moved the creation stuff to the player controller like you said, as seen below, the player controller in the top down example project was named TopDownController, so that is where I put it.
504d2d673feecf93403db238c986d7cc8234f109.png

But as you see here when I reference the player controller it says it is not compatible:
37e85cf19a91c7658b7bd65762f47f3cd557d441.png

I’m sorry guys I am a scrub.

This doesn’t work either:
no es bueno.png

You didn’t bind the event in the player controller. Also did you set up your project to use your custom player controller? (in project settings)

d28f100e7b180aa9993346296767d363c935091f.png

widget.png

projectsettings.png

You can call the event dispatcher from anywhere, just get the widget reference from the player controller. I didn’t add it as a variable here but do that (like in your last picture).

But I have no use for a custom event in my player controller, I appreciate and I atleast believe I understand what your telling me to do but 'Im not trying to fire an event in my player controller.

I never switched to a custom player controller Im using the default one provided in the top down example project

Edit: I’m not sure how adding the bind and custom event would have made it work, I tried it anyway and my player controller ref still inst working :confused:

I mean it doesn’t have to be in your player controller, the point of the player controller is that you create the widget there so you can easily get a reference to your widget with the event dispatcher. You need to cast from Get Player Controller to the real player controller BP (pure cast works too).

Some more things you can do:
Call the event dispatcher from some other BP
Call a custom event in your widget from some other BP
f2f9569f0bad3ff10623d27885b9c54c04ba1d5d.png

Bind a new event to the event dispatcher in some other BP (turn off context sensitive to show it in the list), easy when you can get a reference to the event dispatcher in the widget.
1d06797a040e733401c995ff76e5be6150d90d4b.png

If this is still not what you want to do you should probably take a look at the blueprint communications video from Epic.

Omg, m8, you did it.

Im literally in tears! You flippin did it m8! The cast node was all I needed! Taha! Im gonna go learn about casting! Cheers!

I only kinda have an idea of what u did but your instructions worked! I create the widgets in my player controller and then I use the cast nodes to reference them properly which then allows my blueprints to properly contact one another!

Cyaoeu for president! Also will you be my big brother?