Discuss Scratch

companioncreate
New Scratcher
2 posts

How to put a "Wait 1 second" block in a forever loop without slowing down the whole script.

So I have a piece of code that looks like this:
change [points per second] by (1)
wait (1) secs
But it was in a forever loop with other code so it slowed down the other code, please help me fix this!
Unixy-Code
Scratcher
500+ posts

How to put a "Wait 1 second" block in a forever loop without slowing down the whole script.

companioncreate wrote:

So I have a piece of code that looks like this:
change [points per second] by (1)
wait (1) secs
But it was in a forever loop with other code so it slowed down the other code, please help me fix this!

Turbo Mode?
yavuz61035
Scratcher
500+ posts

How to put a "Wait 1 second" block in a forever loop without slowing down the whole script.

put the change points in another loop and the other code in another loop or this:

when green flag clicked
forever
change [points per second v] by (1)
wait (1) sec :: control
end

when green flag clicked
forever
. . . // put your other code that is supposed to run fast here
end
companioncreate
New Scratcher
2 posts

How to put a "Wait 1 second" block in a forever loop without slowing down the whole script.

Thank you so much yavus, it worked!
i'll follow you on my other account called @craysilver

Last edited by companioncreate (Jan. 31, 2022 14:56:31)

Powered by DjangoBB