How to make a value increase every second!



Have you ever wondered how to make a value increase every second, and to be able to change numbers through purchases? Ever wondered how they do it in the best tapper games?
Wonder no more!
You need a repeat forever block and two values, for example, Eggs and Eggs per Second.
Place an increase value block inside the repeat forever that goes like this: Increase value Eggs by Eggs per second.
Then in the same repeat forever, place a wait 1000 milliseconds block.
Remember to give the per second value a starting number though!

Code is taken from my project, Easter Clicker.

Clicker produce clicks by itself ,how to do that!

Great topic! :clap::smile:

I wish I could like.... ;-;


Here, I liked for you...


Awww, thanks! What is your username in HS?

Still can't like. ;-;


Stick88 on hopscotch and forums.


But...if your value was, like "Cheese" (IDK :smiley:) couldn't you just do "Repeat forever-increase value of "Cheese" by 1, wait 1000 miliseconds" instead?


Yes, but with a separate value for the increase, you can make an option to change how much it increases by each second.

#8 one! What's your username on hopscotch? :smile:


Same as the forum, GoatLord.


Oh ok I'll go check your profile!


Reviving topic.
I'm pretty sure it's useful.




Revival toim!
Tem greetz u with very nise smoil!


Very good topic
Glad you keep reviving it


This gave me my first nice topic!
On my first day too!
I remember my first days here...
It was so confusing!


Revival again


Actually, by Hopscotch delay, I think this is false. When I run a block and a wait 1000 milliseconds block, it will take a little bit than a second because (maybe) Hopscotch determines every block to run (which means it has a little delay for like 20 milliseconds for every block, however the 20 milliseconds thing may change due to your iDevice performance) which it takes longer than 1 second.


Well, I made this topic before I could even make smooth backgrounds.