I know this has been answered a million times, but I need to know this regarding my setup/code.
I am making a cookie clicker clone and I’m having trouble with making the counter go up by 1 every second after the upgrade has been bought. It either goes up too fast or doesn’t go up at all.
I have uploaded pictures of my code. What am I doing wrong here?
Hello! There’s actually an official video with some details on what you’re asking
I’ve updated my code to something close to the video, but It’s still counting up WAY too fast.
why does this even exist?
cause it seems to do nothing
I thought that it would act as a delay of sorts so that the counter would only go up by 1 every second or whatever the variable is.
It kind of looks like you’re telling it, as soon as this bool is true, start a timer, and only do this once. So now the timer is started and it’s going to run forever without stopping, because there is no command saying, ie if it’s > x seconds, increase cakeclone and reset timer. Then it looks like it’s saying if the timer is greater than x seconds, change cakeclones, and do this continuously as long as the timer is greater than x seconds, which it alway will be because it’s started once and keeps going. And then “wait”, but wait only works in front of an action because the way it is now you’re saying, "wait for x time, then I have no more commands for you ". Not like “wait for x time then restart the timer.”
potato-coder’s snippet is nice, here there should be a
Start (or reset) scene timer event instead to reset the PLUS1effect timer
That seemed to fix it. Thanks, everyone!