Discuss Scratch

rh_junr
Scratcher
81 posts

Run without wait option

When someone creates a custom block, they can find a checkbox that says “Run without blocking caller script”. That would allow this:

Download::custom
...//do your stuff here
wait until <(downloaded) = [1]>
Upload::custom

Alexphan did a better job explaining this:

alexphan wrote:

To those that might want clarification…

Normally, custom blocks run, but the blocks below it don't run. So the script has to wait until the custom blocks are finished, and then the rest of the script will run. What the OP is suggesting is that the rest of the script doesn't have to wait, so the custom block will launch, and then immediately after the launch the rest of the script will run.

tl;dr: The custom block acts sort of like a
broadcast [ v] and wait
rest of the script :: grey
but with this option, it will act like a
broadcast [ v]
rest of the script :: grey

I agree with this suggestion. Although it could be workarounded with broadcast blocks and variables, it would be a pain to create 10 variables for the inputs for, say, a font engine.

FAQ

Q: Why would we need this?
A: It would allow you to start work in the background, then do stuff. This would also mean that you could get your timing perfect.

Have another question? Ask below and I'll add it here!

Last edited by rh_junr (Nov. 7, 2016 21:19:40)

alexphan
Scratcher
1000+ posts

Run without wait option

To those that might want clarification…

Normally, custom blocks run, but the blocks below it don't run. So the script has to wait until the custom blocks are finished, and then the rest of the script will run. What the OP is suggesting is that the rest of the script doesn't have to wait, so the custom block will launch, and then immediately after the launch the rest of the script will run.

tl;dr: The custom block acts sort of like a
broadcast [ v] and wait
rest of the script :: grey
but with this option, it will act like a
broadcast [ v]
rest of the script :: grey

I agree with this suggestion. Although it could be workarounded with broadcast blocks and variables, it would be a pain to create 10 variables for the inputs for, say, a font engine.
rh_junr
Scratcher
81 posts

Run without wait option

bump
rh_junr
Scratcher
81 posts

Run without wait option

bump
Jonathan50
Scratcher
1000+ posts

Run without wait option

This is a duplicate.
rh_junr
Scratcher
81 posts

Run without wait option

Jonathan50 wrote:

This is a duplicate.
Thanks for letting me know, I will close this topic.

Powered by DjangoBB