Discuss Scratch

Tommy100
Scratcher
100+ posts

Stop a Certain Script Block

Currently stop blocks only include: stop all, stop this script, stop other scripts in sprite. I really need this script for my game. Can you make another stop block option. Stop a certain script. I was thinking you would drag down from the stop script and when you clicked the option it would ask you, “Which script would you like to be stopped?” and then you would click on the script in the sprite. Would anyone find this script helpful? I would like Scratch Team to check this out.
Nether_before
Scratcher
1000+ posts

Stop a Certain Script Block

Support because this would be useful
Tommy100
Scratcher
100+ posts

Stop a Certain Script Block

Nether_before wrote:

Support because this would be useful
Thanks!
matey1234
Scratcher
1000+ posts

Stop a Certain Script Block

you can just put a stop this script in your script. no support.
The_Scratch_Squad
Scratcher
1000+ posts

Stop a Certain Script Block

Workaround:
whenclicked. . .broadcastStop Script

whenIreceiveStop ScriptsetStop 1to1whenthisspriteclickedifStop1=1thenstopThis Scriptelse. . .
This would most likely work, so no support.
Tommy100
Scratcher
100+ posts

Stop a Certain Script Block

matey1234 wrote:

you can just put a stop this script in your script. no support.
The problem is, if you have to use wait blocks or glide blocks and you need the script to stop right away then it wouldn't work. Here's why I need that block: I'm making a game and in the enemy's script I need it. Here's the scripts:
whenbackdropswitchestoGame Startsglide...secstox:...y:...glide...secstox:...y:...
etc.


For the second script:
whenbackdropswitchestogame starts
foreverwait...secsnextcostume



For the last script:

whenbackdropswitchestogame starts
foreveriftouchingmissile?thenstopscript 2

So as you can see, I can't put if <something> inside script 2 because it uses wait blocks. (Unless I used like 50 wait blocks like 0.01 second. Then if <this> then like 50 of those inside the same script!) I don't want script 1 to stop. I want script 3 to stop script 2. Do you get it now?
why_the_heck_not
Scratcher
8 posts

Stop a Certain Script Block

You could do this:
foreveriffoo=stopthenstopelse
LP_Play
Scratcher
1000+ posts

Stop a Certain Script Block

whenclicked. . .broadcastStop ScriptwhenIreceiveStop ScriptsetStop 1to1whenthisspriteclickedifStop1=1thenstopThis Scriptelse. . .

Thanks The_Scratch_Squad!

Last edited by LP_Play (July 29, 2016 21:09:10)

BaconAndEggs1
Scratcher
1000+ posts

Stop a Certain Script Block

LP_Play wrote:

-snip-

Thanks The_Scratch_Squad!

Check the last post date next time to avoid necroposting, this thread hasn't been active since April of last year.
Scratcher1002
Scratcher
1000+ posts

Stop a Certain Script Block

LP_Play wrote:

whenclicked. . .broadcastStop ScriptwhenIreceiveStop ScriptsetStop 1to1whenthisspriteclickedifStop1=1thenstopThis Scriptelse. . .

Thanks The_Scratch_Squad!

Won't work. If someone clicked the sprite, and then met the requirements to stop the script, it'd just keep going because it will only check for this at the beginning of the script. Huge support. This could help a lot.
Sheep_maker
Scratcher
1000+ posts

Stop a Certain Script Block

How would one select the script to stop? Would this also stop scripts outside the sprite/stage?
LP_Play
Scratcher
1000+ posts

Stop a Certain Script Block

BaconAndEggs1 wrote:

LP_Play wrote:

-snip-

Thanks The_Scratch_Squad!

Check the last post date next time to avoid necroposting, this thread hasn't been active since April of last year.
Oh yeah, thanks for reminding me, I forgot to check the date!
iYoloPro
Scratcher
4 posts

Stop a Certain Script Block

My problem is when the background switches, I want it to stop repeating. And I set the stop block to this script.
turkey3
Scratcher
1000+ posts

Stop a Certain Script Block

Tommy100 wrote:

matey1234 wrote:

you can just put a stop this script in your script. no support.
The problem is, if you have to use wait blocks or glide blocks and you need the script to stop right away then it wouldn't work. Here's why I need that block: I'm making a game and in the enemy's script I need it. Here's the scripts:

Once people get to more advanced coding, though, they will likely not use glide blocks and may replace wait blocks with variable timers, allowing it to still work.
megaman100
Scratcher
100+ posts

Stop a Certain Script Block

Support
JobberWokker
New Scratcher
3 posts

Stop a Certain Script Block

Either this function is broken in v 3.0 or something is wrong. Stop script does't seem to be working.
gamebeater187
Scratcher
1000+ posts

Stop a Certain Script Block

The_Scratch_Squad wrote:

Workaround:
whenclicked. . .broadcastStop Script

whenIreceiveStop ScriptsetStop 1to1whenthisspriteclickedifStop1=1thenstopThis Scriptelse. . .
This would most likely work, so no support.
Almost the hardest workaround ever, obviously the only harder workarounds are private messaging, cloud lists, “bounce” block, and so forth.

Besides, the workaround doesn't even work in 3.0.

Therefore, Support.

Last edited by gamebeater187 (Dec. 29, 2018 18:52:57)

ZappyBarbecue10
Scratcher
20 posts

Stop a Certain Script Block

Tommy100 wrote:

Currently stop blocks only include: stop all, stop this script, stop other scripts in sprite. I really need this script for my game. Can you make another stop block option. Stop a certain script. I was thinking you would drag down from the stop script and when you clicked the option it would ask you, “Which script would you like to be stopped?” and then you would click on the script in the sprite. Would anyone find this script helpful? I would like Scratch Team to check this out.
Support. Would help a lot with games with clones.
CalculatorFun
Scratcher
94 posts

Stop a Certain Script Block

If you want to stop a certain script, use the define block
definexstopthis script
CodingKidz1544
Scratcher
39 posts

Stop a Certain Script Block

How would this work? Would scripts have to be numbered? No support.

Powered by DjangoBB