Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a clicks per second upgrade in a scratch game?
- ThyFunniGuy
-
3 posts
How to make a clicks per second upgrade in a scratch game?
I am trying to make a CPS feature in a clicker game. I am currently using Griffpatch's number counter code for the score, and i tried the “increase clicks by score method.” Like this:
but when I run this code, the cps is set to nine and the score shoots up way more than nine every second. The index variable for the score is nine, so that has something to do with it. Any help?
change [cps v] by (1)
change [score v] by (cps)
but when I run this code, the cps is set to nine and the score shoots up way more than nine every second. The index variable for the score is nine, so that has something to do with it. Any help?
Last edited by ThyFunniGuy (Jan. 17, 2025 16:52:23)
- jmb1293634
-
1000+ posts
How to make a clicks per second upgrade in a scratch game?
try this:
when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)
then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
- ThyFunniGuy
-
3 posts
How to make a clicks per second upgrade in a scratch game?
try this:when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
Okay, i'll tell you how to get to the clicker section. https://scratch.mit.edu/projects/1099576460/
Once you launch it, hover your cursor at the middle-top section of the screen until you see a white box with a question mark. Click that, and there you go.
- JLP_THE_GOAT
-
1 post
How to make a clicks per second upgrade in a scratch game?
i got
no clue so dont ask me
no clue so dont ask me
- somethingelse0_0
-
65 posts
How to make a clicks per second upgrade in a scratch game?
Do you mean like if you get 9cps than it is equivalent to 9 clicks per second?
If so, just do something like:
If so, just do something like:
change [add_clicks v] by ((timer) * (cps))and when the button is clicked, then just +1 “clicks”. Use the “Final_clicks” for the actual score. It's not perfect, but that's all I can think of.
set [Final_clicks v] to (round ((add_clicks) + (clicks)))
- Oneshot_Enthusiast
-
100+ posts
How to make a clicks per second upgrade in a scratch game?
try this:when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
problem with that is that the block
try this:when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
problem with that is that the block
when upgrade::events hatdoesn't exist so
Last edited by Oneshot_Enthusiast (Sept. 9, 2025 11:53:48)
- subtostuffwithjames
-
1 post
How to make a clicks per second upgrade in a scratch game?
think [] for (2) secs
say [] for (2) secs
- Com_engineer_Tom
-
69 posts
How to make a clicks per second upgrade in a scratch game?
I think it is inferred that you should broadcast a messagetry this:when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
problem with that is that the blocktry this:when upgrade::events hatif that is what you mean by
change [cps v] by (1)
when this sprite clicked
change [score v] by (cps)then sorry can you share the project too allow us to test itchange [cps v] by (1)
change [score v] by (cps)
problem with that is that the blockwhen upgrade::events hatdoesn't exist so
- Discussion Forums
- » Help with Scripts
-
» How to make a clicks per second upgrade in a scratch game?