Branch not working?

This is what it looks like:

This is a widget. I want it to close when an objective is done. But it doesn’t work.

What does not work? It stays on screen? It does not show up? You add it and remove it immediately. Delay the removal, or or use the latent play animation node.

This is all about the event. “Event Construct” fires once when the widget is created. So basically you are asking the widget to remove at the construction if the protagonist objective1 is done.
For this you’d rather use an event dispatcher. See that as a listener function.

How it works : you create an event dispatcher inside of the protagonist class and you call it when the objective is done (same place where you set your boolean to true, you drag the event in the graph and choose “call”). The protagonist prevents “Hey, the objective1 is done”.
Now, classes listening to the event can react. It must be the case of your widget. From your “cast to protagonist”, instead of getting the bool, you have to look for “assign (name of the event)”. This will automatically create an event that will fire when the objective is complete, and it is listened from the moment the widget is constructed.

What does not work? It stays on screen?

Yes it does. It just stays on screen.

  • how do you add it to the screen?
  • does the cast fail? connect Print String to Cast Failed - does it print?
  • also print the value of the bool - what does it say?
  • how do you add it to the screen?

I add it on the level blueprint “eventbeginplay”. So that when the level starts, the objective widget opens aswell

  • does the cast fail? connect Print String to Cast Failed - does it print?
  • also print the value of the bool - what does it say?

Here:

Nothing is happening

Thanks! It works now!