Setting Boolean doesn't work

I’m making a menu with different animations. Now I want to play different animations based on which menu('s) is/are open, like this:Snip - freesnippingtool.com_capture_20210225230910.png | ImgHostr

The Boolean ‘bIsOptionsActive’ is set when I hit a button to go to options, like this: Snip - freesnippingtool.com_capture_20210225231039.png | ImgHostr

I’m guessing I’m doing something wrong with setting the boolean, but I really don’t have a clue how to fix it. All help is appreciated.

it seems nothing wrong to me

i think you should check executing it properly, like using print. maybe wrong cast in first place

and how about make Enum and execute by switch, it also gave you what you want and pretty

alt text

You need to do the RemoveFromParent last. It’s just not running the rest of the code…

If all of this is being done in the same widget then Clockwork is right in stating the issue w/ the remove from parent node. That will destroy the widget and nothing after it will be ran. That should be the last thing done. In addition, if you’re using other widgets for sub menu’s, then you need to place the boolean variables in a different area that isn’t destroyed like the blueprints are such as player character or game mode if it’s singleplayer. If you destroy the widget, the variable is also destroyed and the state is lost.

Should this be done by making a new class, or can I just do it in a existing class. And if I put it in a different class and cast to from widget to the class with booleans, what do I put in object? Thanks for your answer.

I would say that the Parent widget is a good place to hold those because if the parent widget is destroyed, then all children should also be destroyed it looks like in your situation. You shouldn’t ever have no main menu but the video options are open.

If you ARE wanting to have like 3-5 widgets open then HUD may be the place to store them and just do children off there.