So I'm making a menu for my game and to access it you need to left click an object to open it up and click outside of the menu to close it.
But I don't know how to do it.
With the code that I have right now, when I hold down left click the menu stays open but when I let it go it disappears.
(Object I want to click)
(The menu)
So could someone please help me with this
You could use a variable to determine when the menu is open, something like this :
On object clicked : set menuopen to 1, show menu.
On any click, mouse cursor is not over menu, and menuopen = 1 : set menuopen to 0, hide menu.
Develop games in your browser. Powerful, performant & highly capable.
eventually this plugin may help i guess !
https://www.construct.net/en/make-games/addons/353/touch-plus
description: Changes the built-in Touch plugin's behavior adding additional settings: ignore invisible objects, don't click/touch through objects and others