Tell when the stop sound block is ran

Ok, so is there a way to sense when the stop sound block is ran?

Probably not without JavaScript (you need to look at the source code for this). You should also be able to use variables for this.

I tried this, but it didn't work:
untitled script pic

we have a block for this:

untitled script pic (32)

How does that detect the stop sound block?

oh! I misread the question, sorry! :man_facepalming:
There is no way.

ok, thanks

mmm...... :slight_smile:

Define a custom block that has something like
stop sounds;
set stop sound ran to true;
wait 0 sec;
set stop sound ran to false;

wait 0 sec; won't change anything, also if I want it to stop all sounds, I'll have to put in the stop all sounds block.

wait 0 seconds yields in scratch, but not in snap I think. You can make a custom block that is stop sounds and the broadcast something, and then hide stop sounds.

wait 0 secs does yield once in Snap.

does it yield when it's warped?



right, it doesn't yield when warped. But it probably should. Let me see...
Ah, no. I specifically reminded my future self in the code that the yield should be overridable by using warp, so, sorry, no.

If you're warping something and you want it to yield, you can warp just the first part and put a wait 0 secs after the warp block, the put another warp block after to warp the rest of it that you want warped.

Isn't there a grey unwarp block in control? It yields, even when warped.

There is not an unwarp block.

first warped part + wait 0 + second warped part   doesn't work if the warped thing includes a loop and the wait 0 is inside the loop (which I would expect to be the common case).

Maybe you can hack something with continuations: jump out, wait 0, jump back in.