How can I make an actor move when a UI button is clicked?

I have a simple button on screen (Widget Blueprint) and I want to make a box (Actor Blueprint) move when the button is clicked.

Currently I’ve set the movement up to use the keyboard but I want to change this to use the UI instead.

100652-widgetbutton_eventdispatcher.jpg

I’ve watched a few tutorials on using event dispatchers and binding to these events but I’m still failing to grasp how to get set this up correctly. Anyone able to help?

Many thanks,

Rob.

You have not bound the event so the widget cant call it.

Have a look.

Make the dispatcher in the widget actor. Then you have to get a reference to that widget actor and from that actor node(after cast) you bind your dispatcher to your event.

Thanks for this info/video. I’m still struggling to bind it… I noticed he is getting the Player Character. However I’m not using a character just and actor. Could this be my issue? Many thanks.

Hi, many thanks. For the help. I still could not get it to work but I’ve managed to do it by using Event Tick, to check if the button has been pressed instead of the Cast way. Seems to work…