How to get widget to work with Event

Ok have been working on getting a Widget to Work with a Event Held in a Unit. I made a Blueprint interface that holds the events, then I made a Event Dispatcher to Try to get the button to work with the Event in the Unit. But ever time I try, nothing. I know the code of moving the Units works, for I tried them out on the Even Begin Play, so for some reason the Event is not being recognized with the UI. I am trying but lost in what is going on. Anyone can give me some direction on how to do this?

Bump

wher do you set the AutoWorker Variable?

just from the screenshots i woulf guess, the Variable is never set and is nullptr at this point…

Tried setting it before and it still would not respond. Plus the casting should have set it, but I can give it a go again.

the casting is not setting anything.

the widget is not knowing
A if your Object is existing
B if the Object is spawned
C what type of Object…

you need to set this manually
just by selecting a vatiable type and cast, it won’t get your Object in the World.

look for Actor Getters like
GetAllActorsOfClass

this returns an array of all actors of your soecific class. You need to iterate over it, to get your specific actor and set the variable with it…

Tried both of the end nodes, still is not working.

cause you don’t need to bind an Event here… :man_shrugging:

just make your Event in your AutoWork Actor something like this:

And call that custom event from the Widget…

Video Explaining the problem hopefully a bit better. Tried seems to not be working unless I am missing something I am not catching:

UPDATE: The command is is going through but the units are not responding, But, it seems something is up with the AI Move To command, not sure why it is having issues, for if I connect it to the Begin play it works. But try to have the UI trigger it it doesn’t get past the AI Move To. Not sure if it is the AI Controller itself. This is odd never have ran into this problem before.… Anyone know what is up?

Bump