Discuss Scratch

StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

We all know about the
stop [ v]
right?
Well we have
“stop this script”
“stop all”
“stop other scripts in sprite”

Well I propose a new stop block, that may only be useful in broadcasts, and custom blocks, but can open a whole new door for scratchers.

I propose the
stop [parent script v]

This would allow for more compact scripts, for example here
this
insert hat block here::hat grey
if <(disable) = [1]> then
stop [this script v]
end
...
would be this
insert hat block here::hat grey
disable?
...
define disable?
if <(disable) = [1]> then
stop [parent script v]
end

For example if you had multiple hats using the same
if <(disable) = [1]> then
stop [this script v]
end
script, then we could make it even more compact with
define disable?
if <(disable) = [1]> then
stop [parent script v]
end

What do you think?

Last edited by StrangeMagic32 (May 30, 2019 02:28:01)

12944qwerty
Scratcher
100+ posts

A new option in the "Stop" block

Support! This would be useful for checking things (like dying in a platformer) where the parent script is a loop you need to stop if True is returned.
ScratchMarioMan64
Scratcher
100+ posts

A new option in the "Stop" block

Not sure how'd I use this but I'm sure @griffpatch might like it lol.
Support.
imfh
Scratcher
1000+ posts

A new option in the "Stop" block

Would the block continue running after that?

when green flag clicked
my block

define my block
stop [parent script v] ::stack
...// Would this run?

Also, would it stop the whole block chain?

when green flag clicked
block A
... // Would this run?

define block A
block B

define block B
stop [parent script v]

Either way it would be pretty useful. It could be pretty handy to have more selective control of scripts from within custom blocks.
StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

imfh wrote:

when green flag clicked
my block

define my block
stop [parent script v] ::stack
...// Would this run?
It would not continue to run, seeing as right now it's a cap block, not stack

imfh wrote:

when green flag clicked
block A
... // Would this run?

define block A
block B

define block B
stop [parent script v]
Yes the “flag clicked” block would still run, seeing as it's the grandparent, not parent
Kraken_Games
Scratcher
100+ posts

A new option in the "Stop" block

StrangeMagic32 wrote:

snip

Support. This would be quite useful for developers with lots of functions

Also, your forum signature is melded with your post for some reason
StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

Kraken_Games wrote:

Also, your forum signature is melded with your post for some reason
ha ha xD
yeah I've seen this glitch quite a bit
D-ScratchNinja
Scratcher
1000+ posts

A new option in the "Stop" block

Is the block you suggested basically the same as this?
break out of loop :: control
If so, this could be a duplicate.

Last edited by D-ScratchNinja (May 24, 2019 00:43:08)

imfh
Scratcher
1000+ posts

A new option in the "Stop" block

D-ScratchNinja wrote:

Is the block you suggested basically the same as this?
break out of loop :: control
If so, this could be a duplicate.
No, it's not. The “stop this script” block stops a custom block and goes back to the script that ran it. This block would stop both the custom block and the script that called it.
D-ScratchNinja
Scratcher
1000+ posts

A new option in the "Stop" block

Oh, okay. I get it now.
StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

bump
StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

bump
infinitytec
Scratcher
1000+ posts

A new option in the "Stop" block

Support, per above. Could be useful. It might need rephrasing however to keep it understandable to new Scratchers, or be in an extension.
--Snowball--
Scratcher
500+ posts

A new option in the "Stop" block

Good idea! I'm not sure if I specifically would be using this that much, but it still seems like many people would!
Loki-M4
Scratcher
6 posts

A new option in the "Stop" block

Support.
Kraken_Games
Scratcher
100+ posts

A new option in the "Stop" block

Loki-M4 wrote:

Support.
Why do you support? Just saying ‘support’ doesn't add anything to the discussion
evanultra01
Scratcher
100+ posts

A new option in the "Stop" block

Support! Having to experiment endlessly with stop blocks to make a thing could make for a very good use in games that have like a second chance!
StrangeMagic32
Scratcher
1000+ posts

A new option in the "Stop" block

bump
Robby_Blue
Scratcher
100+ posts

A new option in the "Stop" block

Support
BlueStarPort
Scratcher
100+ posts

A new option in the "Stop" block

Robby_Blue wrote:

Support
Why?

Powered by DjangoBB