Hello friends, I'm trying to develop a upgrade tree menu. It consists of a upgrade tree :0 that scrolls up and down, and there is the HUD in the bottom of the screen on which the player will check the price of the upgrade and access the "buy" button, and "home" button, as well as the "up" and "down" buttons that will move the upgrade screen.
My problem is: Even though the upgrades buttons are under the HUD, the player is still able to click on it, and since there are buttons on the HUD, both the buttons on the HUD and those under it are being activated at the same time.
You can see how this is not a good thing.
So, what do I need to do in order to make the HUD "solid" (Not solid because I already tried that and it didn't work) in a way that the buttons underneath it cannot be accessed?
There are many ways to do this depending on how you have your events set up.
Are all buttons instances of the same sprite or are they seperate objects.
Do you change to the hud with a global variable or is it a layer that becomes visible?
In any case it would either be adding a condition to the on clicked/on touched event, or putting the events in a group and deactivating the group when the hud is shown.
Develop games in your browser. Powerful, performant & highly capable.
Since the buttons go up and down I put a condition that allows only buttons with the shown area to be "clickable", so it's working for now.
Thank you very much