Discuss Scratch
- Discussion Forums
- » Suggestions
- » Stop all sounds in this sprite block or stop a certain sound
- JelliBeens-1
-
71 posts
Stop all sounds in this sprite block or stop a certain sound
Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)
when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
- Zyaxis_Lotl
-
100+ posts
Stop all sounds in this sprite block or stop a certain sound
this is a good idea it will make scratch easier to use so I support it
- ImmortalJelly13
-
500+ posts
Stop all sounds in this sprite block or stop a certain sound
honestly this is just a simple idea that would make scratch a tiny bit better.
This has my full support.
This has my full support.
- Zyaxis_Lotl
-
100+ posts
Stop all sounds in this sprite block or stop a certain sound
cool but i still hope scratch team will add the block Workaround:define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)
when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
- EDawg2011
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
bump
came from this topic
came from this topic
- Eason_9
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
bump + support, this can make adding multiple theme songs way easier
- PizaGranny8878
-
26 posts
Stop all sounds in this sprite block or stop a certain sound
Workaround:
Have an invisible sprite, and have other sprites broadcast a message when they want to create a sound.
Put this in the sprite with the sounds:
Also, this could be useful for a looping sound that you want to end at a specific point.
Have an invisible sprite, and have other sprites broadcast a message when they want to create a sound.
Put this in the sprite with the sounds:
when I receive [start sound v] :: control
create sound (...::grey)
define create sound (sound)
set [mySound v] to (sound) // for this sprite only
set volume to (...::grey) %
create clone of [myself v] :: events
when I start as a clone :: events
start sound (mySound) :: sound
repeat (... :: grey) ::events // adjust this value depending on the length of your sound so that it keeps looping until just after the sound ends
if <should this sound end? :: grey> then :: events
set volume to (0) %
end
end
delete this clone::events
Also, this could be useful for a looping sound that you want to end at a specific point.
- Xzillox
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
generally a workaround is not the best reason to not implement a suggestion, especially one as (relatively) complex as this Workaround:
Have an invisible sprite, and have other sprites broadcast a message when they want to create a sound.
Put this in the sprite with the sounds:
#snip#
Also, this could be useful for a looping sound that you want to end at a specific point.
- PizaGranny8878
-
26 posts
Stop all sounds in this sprite block or stop a certain sound
i'm not saying that the scratch team should not implement the stop sound ( v) block, it's just a workaround for it if we don't get it/before we get itgenerally a workaround is not the best reason to not implement a suggestion, especially one as (relatively) complex as this snip
- -absoulute_machine-
-
13 posts
Stop all sounds in this sprite block or stop a certain sound
bump
also im so glad my silly little suggestion is still getting attention, thanks so much guys!
D
also im so glad my silly little suggestion is still getting attention, thanks so much guys!

- medians
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
Bringing this topic up.
- NamePending_
-
100+ posts
Stop all sounds in this sprite block or stop a certain sound
Support. Here's how I think the blocks would function:
Stop sounds in sprite
Stop specific sound
Sprite code:
If anyone has any other ideas, I'll try to add them here.
Stop sounds in sprite
stop sounds in [Sprite1 v] :: soundThis one is pretty self-explanatory. It would stop all sounds in the selected sprite.
Stop specific sound
stop sound [pop v] :: soundThis block also seems simple, but there is one thing we must consider: What if the cat sprite and another sprite have the pop sound in them? I think a good fix for this would be to have the dropdown only extend to the sprite currently open. To stop sounds in other sprites, you could just do this.
Sprite code:
broadcast [stop Sprite2 sounds v]Other sprite code:
when I receive [stop Sprite2 sounds v]
stop sound [pop v] :: sound
If anyone has any other ideas, I'll try to add them here.
Last edited by NamePending_ (Feb. 28, 2024 12:52:52)
- DangerPuppy10
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy. Workaround:define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)
when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
- NamePending_
-
100+ posts
Stop all sounds in this sprite block or stop a certain sound
He said that he isn't trying to undermine the suggestion, he's just providing us with a workaround to use if the suggestion isn't implemented.You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy. Workaround:define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)
when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
- DangerPuppy10
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
All he said was “workaround:”He said that he isn't trying to undermine the suggestion, he's just providing us with a workaround to use if the suggestion isn't implemented.You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy. Workaround:define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)
when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
- DangerPuppy10
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
.
Last edited by DangerPuppy10 (Feb. 29, 2024 01:56:47)
- RethinkingVoxels
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
Beans
Last edited by RethinkingVoxels (March 1, 2024 01:39:24)
- DangerPuppy10
-
1000+ posts
Stop all sounds in this sprite block or stop a certain sound
aaahh yes, beans. Beans
- Discussion Forums
- » Suggestions
-
» Stop all sounds in this sprite block or stop a certain sound