Discuss Scratch

An0therRand0mC0der
Scratcher
1000+ posts

Disable specific blocks inside the editor when testing

Example: If you had a block like this:

wait (1000) secs

at the beginning of your code, and when playtesting it, it will take forever for the following event to occur.
I know a lot of you are gonna say that you can simply remove the block from the code and then put it back, but I'm gonna say this: What if this block is attached to a really large script? It'll be annoying to take it apart and put it back again.
So what if you had an option to disable blocks or scripts when testing a project?
RL1123
Scratcher
1000+ posts

Disable specific blocks inside the editor when testing

I don't see it this way. It takes three seconds to remove a block from your script, even when attached to a large script.
An0therRand0mC0der
Scratcher
1000+ posts

Disable specific blocks inside the editor when testing

RL1123 wrote:

I don't see it this way. It takes three seconds to remove a block from your script, even when attached to a large script.

Fair point, but I find it annoying to take apart blocks like this:

when green flag clicked
if <(apple)= (banana)> then
other scripts::motion
other scripts::motion
block i want to disable
other scripts::motion
block i want to disable
other scripts::motion
other scripts::motion
block i want to disable
other scripts::motion
end
8bitrkt
Scratcher
500+ posts

Disable specific blocks inside the editor when testing

An0therRand0mC0der wrote:

RL1123 wrote:

I don't see it this way. It takes three seconds to remove a block from your script, even when attached to a large script.

Fair point, but I find it annoying to take apart blocks like this:

when green flag clicked
if <(apple)= (banana)> then
other scripts::motion
other scripts::motion
block i want to disable
other scripts::motion
block i want to disable
other scripts::motion
other scripts::motion
block i want to disable
other scripts::motion
end
I'm pretty sure certain browser extensions allow you to take out certain blocks into a small pile/delete blocks.

Although disabling blocks could be really helpful:

when green flag clicked
Disabled for Testing -wait # seconds- :: control

Maybe something like that?

Edit: another idea

when green flag clicked
Disabled for Testing (pick random [1] to [10] :: operators) :: control

Last edited by 8bitrkt (June 1, 2022 19:53:48)

RL1123
Scratcher
1000+ posts

Disable specific blocks inside the editor when testing

An0therRand0mC0der wrote:

Fair point, but I find it annoying to take apart blocks like this:

It definitely took longer to remove, but not long. I can see how something like this would get repetitive though. For the time being, if you don't want to take out the blocks every time you test your project, keep a copy of the script that doesn't have the blocks that you want to disable and use that for testing.


One idea for the disabled blocks is to grey them out so that it's obvious they aren't running.
turn cw () degrees :: grey

8bitrkt wrote:

I'm pretty sure certain browser extensions allow you to take out certain blocks into a small pile/delete blocks.
Yep, a browser extension allows you to take out individual blocks by holding the control key down. It's could be useful in some cases though I don't use it frequently.

Powered by DjangoBB