Need help coding a mini game!

I’m coding a mini-game that uses tappable overlays and I need help.
Here’s the description: A button (overlay) will appear on the screen and the reader will have a certain amount of time to click the button and gain a point. If they don’t click the button in time, it will disappear and they won’t gain the point. I have some coding down but I don’t know how to have the overlay disappear after not tapping the button.

@overlay BUTTON opacity 1 in 0.6
tappable
"BUTTON"{
@BUTTON +1
@overlay BUTTON opacity 0 in 1
}else{
@overlay BUTTON opacity 0 in 1
}

To remove an overlay from the scene you would use @overlay NAME clear

I know that, but that’s not what I was asking for. I’m trying to make the overlay appear and if it’s not clicked in an amount of seconds, It will disappear, and they won’t gain the point.

Have you tried a timed tappable choice? :thinking:

I have no idea how to do it, but I found a thread on it:

@overlay BUTTON opacity 1 in 0.6
tappable [timed: 1]
“BUTTON”{
@BUTTON +1
@overlay BUTTON opacity 0 in 1
}
“Not Tapped” {
@overlay BUTTON opacity 0 in 1
}

Does this work for you? (:

omg yes it did! Thank you!

No Problem!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.