- Home /
Script to check if button is being clicked continuously
Hi. I have been making a clicker type game and now i would like to add multiplier function like a cookie clicker has. I was thinking something like when UI button is clicked, timer starts and player has to click continuously for 10 seconds and gets multiplier 2x, then timer starts again and clicking must be continued for another 10s to get multiplier 3x and so forth. How should i implement this? Any script examples?
this sounds like a nontrivial idea for zero code to show, what have you tried already? what got closest to working for you? At a thought you know you will need to track how many times the button has been clicked in some kind of counter, reset the counter value if it hasn't been clicked in the past ten seconds etc. you should be able to make some headway yourself. for the multiplier likewise break that down until you know enough detail that you can implement it very simply.