Discuss Scratch

myers020
Scratcher
5 posts

CPS

Can someone please help me get the code for cps, Thanks, Myers020

Last edited by myers020 (Dec. 3, 2020 15:45:09)

jcrchacker
Scratcher
23 posts

CPS

If you wanted to do an average CPS, here is what you would do:

define get cps
broadcast “timer”
set clicks to 0
repeat until done = 1 {
wait until mouse down
change clicks by 1
wait until NOT mouse down
}



when i receive timer
set done to 0
set seconds to 10
repeat(seconds) {
wait(1)
}
set done to 1
set cps to clicks/seconds
jcrchacker
Scratcher
23 posts

CPS

you can replace the seconds variable for whatever amount of time you want.Hope this helped
jcrchacker
Scratcher
23 posts

CPS

here. i made a project for it: https://scratch.mit.edu/projects/458443920/
myers020
Scratcher
5 posts

CPS

i am making a shop were you have to buy cps and this did not work can you please try to help
jcrchacker
Scratcher
23 posts

CPS

Oh! Then you could do a loop like this:
forever:
wait 1 seconds
change whatever by CPS

Powered by DjangoBB