Discuss Scratch

grandad48
New Scratcher
3 posts

Any way to temporarily disable the Green Flag and Stop icons?

Hi, I've been using Scratch to write some ‘games’ to amuse my granddaughter. She's just a toddler, doesn't read yet, but is rapidly mastering interaction with touch-screen tablets. Sometimes she mistakenly hits the Start or Stop icon and misses part of the game. I wonder whether, once the game has started, there is any way that these icons can be temporarily disabled (or hidden), then re-enabled as the game ends?
I realise that this is sort of counter to the idea of Scratch and might have the potential to lock the application if things go wrong, so I'm hoping there is also a way of intervening should that happen?

I'm really impressed with Scratch and how readily it allows one to put together short programs that are attractive to very young children, and I wonder if anyone else has used it for this purpose and come across this problem (telling her ‘don’t do that' just doesn't work reliably at that age).

Thanks for any help available
fdreerf
Scratcher
1000+ posts

Any way to temporarily disable the Green Flag and Stop icons?

As of now, there is no way to currently do this.

In case you don't already know, there is a fullscreen option which makes the screen much larger, but the green flag and stop sign buttons are the same size, making them harder to accidentally hit.
deck26
Scratcher
1000+ posts

Any way to temporarily disable the Green Flag and Stop icons?

Depends on the project. If it relies on sprties being clicked you could just have scripts for that and no green flag script. Clicking the green flag would then stop any scripts that were running but clicking the appropriate sprite would still run the script with that hat block.

If you need any scripts that keep running regardless of the green flag being pressed that's a bit harder as the green flag would have to restart them.

Can you share what you have?

Last edited by deck26 (Sept. 22, 2020 18:09:52)

zHmonster
Scratcher
100+ posts

Any way to temporarily disable the Green Flag and Stop icons?

You could use the
stop [ all/this script/other scripts in sprite]
Block, and it would stop it, but then you would have to restart it…


Whoops!!!!!! Just read the title… Didnt; read the description. Sorry, disregard my reply.

Last edited by zHmonster (Sept. 22, 2020 20:45:21)

Asteroiy
Scratcher
25 posts

Any way to temporarily disable the Green Flag and Stop icons?

This would be a lot of work but you could make sure the game has a “initialize” bringing all necessary fields to default values, then whenever the green flag is clicked it would check if the game is complete. If so it would re-initialize. Otherwise don't initialize and the variables and there values will be saved. Effectively turning the stop button into a pause button. I think this would work, but again it's pretty convoluted.
Nezon
Scratcher
1000+ posts

Any way to temporarily disable the Green Flag and Stop icons?

use a start and stop detector
awesome_guy6856
Scratcher
100+ posts

Any way to temporarily disable the Green Flag and Stop icons?

There is a way to “disable” the green flag — don't set any variables when it's clicked. Instead, when you are making the project, set the variables to what you want when the game starts, then save.

For example, if you want the score to save even after the green flag's clicked, but you still want players to start with 0 score:
Delete this:
when green flag clicked
set [score v] to [0]
other code
Change it to this:
when green flag clicked
other code
When you're ready to share your project, use your mouse to click this script (which runs it)
set [score v] to [0]
Then, save the project & share.

Of course… your other scripts will still run which may (or may not) be problematic.

For stop signs, it's a little more difficult. There actually is a workaround to stop signs, but it's way more complex (I can show you if you want) than avoiding this

when green flag clicked
forever
if <key [e v] pressed?> then
change [variable v] by (1)
end
end

Replace scripts with the forever block using workarounds. For example:

when [e v] key pressed
repeat until <not <key [e v] pressed?>>
change [variable v] by (1)
end

The “when this sprite clicked” and “when e key pressed,” etc. blocks trigger even if you pressed the stop button.

Last edited by awesome_guy6856 (Sept. 23, 2020 03:36:37)

scratch___user12345
Scratcher
1000+ posts

Any way to temporarily disable the Green Flag and Stop icons?

oofinguy999 wrote:

yes
please do not necropost, especially just to say “yes”

Powered by DjangoBB