EventDispatcher / Binding not fired

In MyWidget i defined a Eventdispatcher My_Button:


In MyGameState the Function Gamelogic receives the Input PlayersHUD a Widget created from MyWidget and calls Bind Event to My_Button:

But When i start the project it dont gets after this Binding…


Why is this? What am i doing wrong?

Edit: The Warning you can see in the first picture is from an deleted dispatcher and has nothing to do with the result. i created a new one in the hope of gettig it right, but i get the same result.

First things to check would be whether your HUD reference is valid and referencing the correct instance of your HUD. Also, where are you calling My_Button?

Thank you for your answer!
I’m calling MyButton in MyWidget when the buttons are pressed:

MyButton has an Enum-Variable, which holds four Variables for each Button.

The HUD reference is valid. When i run the project the HUD from server and client are correct,

but when the program gets than to this state to funcion logic…nothing happens.

edit: dont wonder i changed the name from Gamelogic to logic. i also changed My_Button to MyButton.tried to do it new…but same result

Here is MyController: MyWidget is now called My1_Widget

MyButton is read only:

I’m thinking the GameState class is like the GameInstance class, which does not tick… which would mean anything after the delay node will never get called… but then again, you are seeing the print string, so that’s probably not it.

It could also have to do with what order these events are being called. At the time you do the binding, the HUD may not exist yet.

Also, try throwing a print string on the button’s OnClicked event to make sure something’s not blocking the click and the correct button is getting clicked.

Beyond that, my only other idea would be that it could have to do with replication, which puts it beyond my area of expertise.

right! OnClicked don’t work. Now i look at it and tell how my progress is. Thank you for helping me!

Oh man… i got it! Thaaank you very very much! I checked my widget…the onClick-events where from another widget, that i dont use now! i connected the OnClicked events with the nodes…everything works now fine!!!

Awesome! You’re welcome!