Discuss Scratch
- Discussion Forums
- » Suggestions
- » Stop a Certain Script Block
- 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
~~If life gives you kumquats, lock your signature up, bury it in the ground and hope it's safe~~
hello child. i am an elf
- Tommy100
- Scratcher
100+ posts
Stop a Certain Script Block
Thanks! Support because this would be useful
- matey1234
- Scratcher
1000+ posts
Stop a Certain Script Block
you can just put a stop this script in your script. no support.
| Artist | Gamer | Roleplayer | Weirdo | Lazy |
- The_Scratch_Squad
- Scratcher
1000+ posts
Stop a Certain Script Block
Workaround:
when green flag clicked
...
broadcast [Stop Script v]
when I receive [Stop Script v]This would most likely work, so no support.
set [Stop 1 v] to [1]
when this sprite clicked
if <(Stop 1) = [1]> then
stop [This Script v]
else
...
end
- Tommy100
- Scratcher
100+ posts
Stop a Certain Script Block
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: you can just put a stop this script in your script. no support.
when backdrop switches to [Game Starts v]etc.
glide (...) secs to x: (...) y: (...)
glide (...) secs to x: (...) y: (...)
For the second script:
when backdrop switches to [game starts v]
forever
wait (...) secs
next costume
end
For the last script:
when backdrop switches to [game starts v]
forever
if <touching [missile v] ?> then
stop [script 2 v]
end
end
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:
forever
if <(foo) = [stop]> then
stop [ v]
else
end
end
- BaconAndEggs1
- Scratcher
1000+ posts
Stop a Certain Script Block
Check the last post date next time to avoid necroposting, this thread hasn't been active since April of last year. -snip-
Thanks The_Scratch_Squad!
- Scratcher1002
- Scratcher
1000+ posts
Stop a Certain Script Block
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.when green flag clicked
...
broadcast [Stop Script v]
when I receive [Stop Script v]
set [Stop 1 v] to [1]
when this sprite clicked
if <(Stop 1) = [1]> then
stop [This Script v]
else
...
end
Thanks The_Scratch_Squad!
・Scratcher1002は「ここにランダムな日本語の言葉はたくさんですか?はい」と言いました・
||||Search:
Topics | Users
||Studios | Projects
||
||||Search:
Topics | Users
||Studios | Projects
||
- 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?
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- 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
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: you can just put a stop this script in your script. no support.
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.
- JobberWokker
- New to Scratch
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
Almost the hardest workaround ever, obviously the only harder workarounds are private messaging, cloud lists, “bounce” block, and so forth. Workaround:when green flag clicked
...
broadcast [Stop Script v]when I receive [Stop Script v]This would most likely work, so no support.
set [Stop 1 v] to [1]
when this sprite clicked
if <(Stop 1) = [1]> then
stop [This Script v]
else
...
end
Besides, the workaround doesn't even work in 3.0.
Therefore, Support.
Last edited by gamebeater187 (Dec. 29, 2018 18:52:57)
My 1000th post!
I haven't changed my logo since my 96th post on 2014. Now at 1000 posts, I changed my logo!
- ZappyBarbecue10
- Scratcher
20 posts
Stop a Certain Script Block
Support. Would help a lot with games with clones. 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.
- CodingKidz1544
- Scratcher
39 posts
Stop a Certain Script Block
How would this work? Would scripts have to be numbered? No support.
Enter signature here…
Check out my new game, Platformer Maker!
set array [Array v] size to () rows and () columns :: list
replace array [Array v] row () column () to [] :: list
(value in [Array v] at row () column () :: list )
(array [Array v] number of [rows v] :: list )
- Discussion Forums
- » Suggestions
- » Stop a Certain Script Block