Can I execute a sound every 10.000 clicks?

Im doing a clicker game, similar to Tamago, but also different, i have a sound and i want it to exeute every 10.000 clicks, how can i do it more compact than this for every 10.000 clicks? Thanks!

Not sure it can get more compact than this:


or this for every 10001 clicks



It dont works, i try to explain me better sorry.

The game starts in 10 million clicks and its a countdown and a countup, i want when you reach 10.000 first clicks, the sound execute, in 20.000 same, and it continuos until the 10 million, i think i explain a little more better, Thanks!

Are you counting up your clicks varuable or counting down from 10 million?

Either way, with my second set of blocks, it shouldn't matter.
(I made it 10001 to avoid possible modulo confusion somewhere in the count)

What happens when you reach 10 million clicks....?

1 Like


When you reach 10 million its a surprise, it plays a video and show a text :wink:

I have some code here that might be of use

It basically starts the number of clicks at 0.

Then when the button is clicked, the code first changes the number of clicks by one.
Once it is done changing the number, it checks to see if the amount of clicks is 10,000.
If it is, the player plays the audio. This could also be where you set the number of clicks back to 0, but that depends on what you are coding

1 Like

Does it dial 911 for immediate attention to your injured finger?
( :upside_down_face: only joking - 10 million is a lot)


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