I have a button. I want to put a shape in front of the button so that you can’t press the button. So I changed the shape’s z-index to 100 and the button’s z-index to 99, but when I click on the shape in play mode the button activates. I added “Physics” to the shape toy, with “Is Sensor” ticked, but it still doesn’t work. Is there a way to make this work? I need to cover the button with the shape for one level (the first level). After the first level it is an active button (the jump button). I know I can use a “State Manager” inside the toy with a variable to set to true on the second level, but it feels like the long way round as I only need that button to be non-active on the first level.
The easiest way to make something non clickable is to make alpha = 0
I can’t make the alpha 0 as it is a toy.
What do you mean? You can make a toy alpha = 0 ?
The jump button is inside the player toy (child of the player). So if I change the button’s alpha to 0 inside the player then the button will be inactive through the entire game.
You can just change the alpha back afterwards? Not sure what you mean by the “entire game”.
For when you dont want it to be clickable - make it 0
The jump button should be deactivated for one level. If I change the button’s alpha to zero in the toy then the alpha is 0 (zero for the entire game). How will you change the button’s alpha back on the second level (the button is inside the player toy)?
With a tween or a translate and a script ?
You set the default alpha to 1.
In the toy you have a script that does:
if level == 1:
and in hide you set the alpha to 0, in the show slot you set the alpha to 1