Blueprint comunication

Hello there! Well, I’m stuck again… On the following issue and I need some help…
Explaining: I have 2 widgets. The first widget has a button that runs an animation on another widget that was loaded over the first one.
The second widget has a button that runs an animation and removes itself from the screen.
To do it, I need a blueprint that makes the communication between widgets.
So, on the first widget, I have this blueprint:

On the second widget, I have this blueprint:

And I got this error:

Resuming: I have a bool variable on the first widget that indicates if the menu is open. On the second widget, I have a variable that references the first one and call that bool as a set, trying to say, “Yes, I know what about are you refer!”, and it indicates that the menu is not open anymore.
My question is, why mt way is wrong? If a had variable on one, called on the second by ref var. Where I’m wrong?
Can someone help me? Thank you all!

You haven’t assigned the FGS reference. You might do better to use ‘get parent’.

Having said that, you ‘bool stuff’ will not work. The ‘start closed’ bool won’t reset the DoOnce.

If the FGS is in front of the other menu, can you press the button again anyway?

My first widget is ‘MyWidget’.

I also made a MyWidget2, which has a reference I will assign to the parent. I expose it on spawn

image

When I make MyWidget2 ( from MyWidget ), I can set it

So, in MyWidget2, I can say

Thank you so much Clockwork! I’ll try and sook I give you a feedback! My eyes are getting in fire now! LOL :smiley:

1 Like

Sorry buddy… doesn’t work… but thank you, it teaches me a very good thing! I can use this idea in another place, for it, thank you a lot!

I found a supid simple solution! :smiley:


This on first Wid.


Nothing special on second WId!

Well… work withou erros LOL

1 Like

I think you might have coded it wrong :wink:

I did test it :slight_smile:

1 Like

If you click it 2x per second, it will never go away. You create a brand new widget every click, as fast as you click. This is an ideal scenario for an Event Dispatcher - that’s what they are made for.

No need to reference anything.