but, by pressing resume the index of the multigate will not advance
meaning that the next time I want to open the menu, I will need to press Tab 2 times so that it would open.
I tried fixing this by creating a shared boolean on my HUD that would turn on if I pressed resume and trigger a multigate cycle based the current state of the boolean so that the Index would corrected the next I wanna open the menu again, however I cannot get his to work at all.
You also have a problem, because you have the same functionality in two places.
Don’t use the gate ( or flipflop ), use a branch, and inspect the widget reference. If it’s valid, you need to kill it, otherwise you need to make it. Put in a variable, rather than taking it directly from the create node.
I kind of see where you’re coming from now, Is Valid should check if the menu is currently active on the player’s viewport based on it’s actual state rather than a sequence like flip-flop. It’s working, kind of, the menu will open and close, however it stops working after it closes. Which is weird since an Is Valid check should always trigger if I press tab.
Hey there @sQuAdeRee! You can also clear the menu var when removing it as well. I’d do this for 2 reasons, one there’s still a reference there (however it’s been put in the pile to be garbage collected and I’m not sure if it’s still listed as valid while waiting to be collected). Two after you remove it from it’s parent it gets flagged to be garbage collected, but won’t be collected for between 1 - 10 seconds.