[4.27.2] how to toggle widget visibility with a boolean check

I’m making a little game where the player collects 10 items to win. but for the life of me I couldn’t figure out how to toggle my “winScreen” widget IF AND ONLY IF variable “itemsLeft” is equal to zero.

I tried creating a bool condition “WIN” that is only true when there are no items left, make the win screen default visibility “hidden”, make a branch that turns the win screen visibility to “visible” when condition “WIN” is true. but it didn’t work as intended.

any suggestions?

You don’t need the boolean, Just show the widget when items left = 0.

1 Like