Using umg button when actor beings overlap?

Hey guys, haha this is stupid that I can’t figure this out but how in the world can you link a umg button to work when you push it when you’re in a actor begin overlapping sphere collision rather then it automatically working when you overlap it. I’m making a mobile game and this has stump me, hell I can’t even figure out how to do it with a keyboard input for a pc Version. So if someone can shed some light on my problem I would be greatly appreciated!. Thanks everyone

@Heten123 Can you be a bit more specific. You can’t ‘push’ UMG button from the game, but you can change it with BP, which you are doing…

Sorry for my vague Description. I have a line of code that fires off when I push F on the keyboard but I want it to run the code when I push a button widget on my view port. How would I run that code with a widget button from another actor blueprint. Thanks for the reply man!

@Heten123 So you want the UI BP to talk to another BP? Have you tried custom events or BP interfaces?

I tried a custom event, only bad thing is the event isn’t in my player character blueprint. I have it in a other actors blue print so when I cast to it and hook my custom event to my widget button it won’t even print a string when I click it so I’m thinking it’s not working because I’m not cast to my third person character. You have any advise on that?

@Heten123 Whenever you have problems finding events like this, then default to event dispatchers. Then the BPs have to play ball.

( I’m not at a machine at the moment, but I think this should do the trick… )