I have a button sprite set to invisible. When I play the game, I am still able to click on it even though I can't see it. How do I disable clickability of the object?
Add another condition with your click: Sprite is visible
c4sp3r89 He meant that he doesn't want his invisible objects to be clickable in any way. He can get them invisible just fine, but they can still be clicked in that state.
— Maybe try putting the buttons/UI elements you want to be fully unavailable in specific layers, then turn on/off said layers? See if that works.
c4sp3r89's solution does exactly what jook00 is asking for. By adding the condition "is visible" to on object clicked, the object will only be clickable when visible. It's the easiest solution.
Develop games in your browser. Powerful, performant & highly capable.
Hah! You are right. I just found it awkward and my brain couldn't process it like that it seems. I need to be more creative if I'm aiming to become a full-fledged programmer!
Wow that is so simple. I feel so stupid. Thank you