Toggle Button that takes visibility as trigger

I tried to make a simple hidden button to reload or quit the game. So the idea was to show the quit and reload buttons when hidden and hide them when shown. But somehow this idea seems not to work. The buttons are never shown.

Does anybody know where my logic went wrong?

Can you try adding trigger once? And doing that also most likely won’t work or cause some issue because you check if closeButton is clicked and is visible then close it. That way, as soon as the closeButton gets visible, the game CLOSES (but I’m not sure tho).

In your first event. if reloadButton is hidden, it is displayed. The next event will also fire, because the hiddenButton is still clicked, and the reloadButton is now visible, so it is hidden. It all happens between redraws of the scene, so it looks like nothing’s happening.

You appear to want to do an if...then...else. You can implement this type of functionality as follows :

2 Likes

Thanks a lot. I do now understand where the problem is. That one of the most basic concepts of programming needs a workaround is something I have to get used to…

But the solution did for some reason not work. As I’m running out of time, I just helped myself with two buttons - one hidden opens shows the buttons, and another one closes the “menu”