Discuss Scratch

Umhead22
Scratcher
100+ posts

My block - continue script

It adds besides “Run without screen refresh”, an option “Continue script”.

It will continue main script, where my block is conected without pausing main script when running it

whenclicked This is main scriptDosomething,forexampleanimation
Blue_Retro_Dragon
Scratcher
500+ posts

My block - continue script

Why wouldn't you just select the “run without screen refresh”? As that runs the custom block instantly and the main script is not “paused”.
SpyCoderX
Scratcher
1000+ posts

My block - continue script

So this is basically creating a new thread to run code asynchronously (separate from main code/thread)?

Couldn't you use a broadcast with a custom block under it?

whenclickedbroadcastasync blockcontinuewithmainthreadwhenireceiveasync blockrundefinerunasynccodehere

Blue_Retro_Dragon wrote:

(#2)
Why wouldn't you just select the “run without screen refresh”? As that runs the custom block instantly and the main script is not “paused”.
What if you wanted to have a forever loop in the custom block? Or make it wait 3 seconds after its been called to do something?

Last edited by SpyCoderX (March 31, 2025 16:13:11)

bubgamer07
Scratcher
100+ posts

My block - continue script

SpyCoderX wrote:

So this is basically creating a new thread to run code asynchronously (separate from main code/thread)?

Couldn't you use a broadcast with a custom block under it?

whenclickedbroadcastasync blockcontinuewithmainthreadwhenireceiveasync blockrundefinerunasynccodehere
what about inputs

Last edited by bubgamer07 (April 1, 2025 17:20:59)

SpyCoderX
Scratcher
1000+ posts

My block - continue script

bubgamer07 wrote:

(#4)

SpyCoderX wrote:

So this is basically creating a new thread to run code asynchronously (separate from main code/thread)?

Couldn't you use a broadcast with a custom block under it?

what about inputs
Set a variable which is for this sprite only.

whenclickedsetvaluetoinput herebroadcastasync blockcontinuewithmainthreadwhenireceiveasync blockrunvaluedefinerunvalasynccodehere
Umhead22
Scratcher
100+ posts

My block - continue script

Blue_Retro_Dragon wrote:

Why wouldn't you just select the “run without screen refresh”? As that runs the custom block instantly and the main script is not “paused”.
If you use repeat loop or repeat until blocks?

Powered by DjangoBB