Download

Solution for UMG Buttons comunicating with Actor BP

Hello,
I have a UMG widget which opens when I press Enter. Inside I have a few buttons which I want them to change actors in the level when you click on the button. So :

If I have a box, I create its blueprint starting with a Event Begin Play node. This way, it works fine BUT the menu is always on. I cant enable/disable it when pressing Enter.
I tried another events, but I dont really know which one works fine.

The correct order would be

-Starting the level.
-Empty screen, no hud. Pressing Enter makes the hud appear.
-Pressing the button from the hud, changes the box -it comunicates through the box blueprint-

How can I comunicate my onClicked button with my box blueprint?

If you need any screenshot just tell me and, thanks in advance!

The same way any blueprint communicates with another. Take your button and look for the events section. There should be a big + for onClicked. Click that. It will create an event for that button. You can then use any normal method of blueprint to blueprint communication. I personally like interfaces. You can also use casts. There are plenty of tutorials for blueprint to blueprint communication out there.

Thank you for answering,

Am I going the right way?

Copying the onClicked node and pasting it inside the box BP doesnt work.

you’ll have to make an event in the box blueprint. The widget will call that event. It looks like the widget should already have a reference. So after you set you’re material you would need to cast the “Mesado Cachina” back to the box blueprint. Once cast you should be able to call that custom event.

Sorry for bothering again awilliams1701,
I followed your steps, or I think so.

Box Blueprint

Widget Blueprint

Am I missing anything? Thanks again

That looks right to me.

But sadly it doesnt work :(. I think the problem its my custom event isnt triggering anything.
When I change it by Event Begin Play, everything works fine, but creating another event does nothing.

Maybe I need an extra node? Reference? I’ve been watching tutorials for days but I still cant find the answer.

See if you can get the debugger to help you. I’ve fixed a lot of issues by watching it flow wrong. You can do a right click and say break on this node or something like that.

Hello Aian. I remember going over this with you on the Answers site. Here Just at a quick glance, where does the hud get a reference to Mesado Cocina? is it none? If it is, it needs to be set before you can change the material.