If there’s just ONE thing that I don’t like about GDevelop, it’s that you can still interact with objects even if they’re hidden with the “hide object” action. Now, this can be handy in some cases (Like making collisions for levels), but there are times when you don’t want a hidden object to be interacted with.
For example, in the Tabbed Menu example, I made the following change:
This makes it so that if my cursor clicks over a level button, the sound effect plays. I tested this out, and tabbed the menu to hide the level buttons and clicked over them. Just as I expected, the level buttons played the sound effect, despite being completely invisible. Something like this could definitely cause some issues.
I also tried this in another project, in which I wanted a powerup to be hidden until the player pushes a button to make it appear. However, despite being hidden, the player was still able to pick it up. I wanted to make it so the powerup CANNOT be collected unless it can also be seen as well.
My solution? Add a new condition: “Object is hidden.” This condition will check if the object is currently hidden. If the condition is inverted, it will check is the object is NOT hidden instead.
There! Now you can make those invisible powerups without collecting them out of thin air! Now you can make a proper tabbed menu without the buttons invisibly overlapping each other!
Likewise, to prevent the same thing happening with hidden layers, there should also be a “Layer (LayerName) is hidden” to check if a layer is currently hidden or not (This is the case for the tabbed menu example).
As of right now, the tabbed menu example DOES NOT WORK since the level buttons can still be interacted with even while they’re hidden (Would this be considered more of a bug? Idk). I would love to see this condition added to prevent issues like these popping up without having to create ridiculous workarounds.
What do you all think? Feedback is appreciated ^^