Communicating between blueprints- Dynamic Material

Hi, this is probably a really dumb question as I’m very new to this but I was wondering if someone could help me out. I’m trying to change the colour of the table on a button press. My Green_Button and Dynamic_Material are in 2 separate Blueprints and I don’t know how to make them communicate with each other. My Green_Button works as it prints the string attached to it and the Dynamic_Material works when it’s activated on Event BeginPlay. However I can’t figure out how to put them together so that the table changes colour when the button is clicked. I’m sure I’m missing something very simple.

This is my attempt so far…

A very simple OnClicked which passes through a boolean variable called Button_Is_Clicked and finally prints a string at the end

Here I’m attempting to say if Button_Is_Clicked then set colour of the Vector Parameter to Green

Thanks

OK so here is how i would do it.

I’ve done this quick so names are mostly generic.

1 - In your TableChangeColour add a custom event and give it a name (mine is ButtonClicked).

2a4d137193bd2a5e07861b75aa6d2b22c8d86744.jpeg

2 - Finish off that blueprint whichever way you want and then compile it.

e4eba6a3c2cbbcacf83450e6c73a863cea459574.jpeg

3 - Go to your widget and now look for a node Cast To (Name of the Blueprint you want, in this case TableChangeColour) and then off of the blue reference node search for the custom event you created earlier. Also in the Cast To node, use the drop down menu to find itself as a reference.

Thanks for responding :slight_smile:

So close. I don’t have the dropdown box under object for some reason. Could it be that I’m casting to a widget blueprint or does that matter? What version of Unreal are you using?

Hmm thats weird, I was using 4.7 because i had a test project set up but it works for 4.8 too