Open kchadha opened 5 years ago
/cc @ktbee
I would question whether the desired option here is making the behaviour completely compatible with Scratch 2...
As I mentioned in https://github.com/LLK/scratch-gui/issues/3932#issuecomment-445558980, I think there's an inconsistency in Scratch 2 in that, while "stop other scripts in sprite" does remove a bubble for an ask block that was still running, it doesn't for a say/think block that was still running (i.e. "say/think for N secs").
Since this behaviour is very rare in projects, it's worth considering whether it could be changed for Scratch 3 to be made more consistent (i.e. so "stop other scripts..." does remove bubble for say/think that was still running).
–Note that I don't see a consistency issue if the bubble came from just a "say/think [something]" block (i.e. without the "... N secs"), since that block was not still running when the script stopped, so "stop other scripts..." isn't stopping that block, and the bubble doesn't need to go away.
Speaking more generally, what could be really great here would be to not just make "stop other scripts..." have specific consequences for specific cases (in this case, removing bubbles), but rather to ensure that it really does what it claims – it actually makes any stopped block act in the same way it would if that block had finished 'naturally' – coded in such a way that these things actually happen 'for free' when the block stops, rather than having to make them happen on a case-by-case basis.
I guess that might involve some fairly major rethink of certain parts of the Scratch code – but I thought it might be worth pointing up that distinction in how to view this, for future consideration.
It should be noted that this bug will not manifest itself until #1831 is merged (it isn't yet).
Expected Behavior
In Scratch 2.0, say bubbles are treated differently from ask bubbles. Say bubbles do not get cleared when running
stop other scripts in this sprite
but ask bubbles do.Actual Behavior
1831 fixes an issue where the ask bubble wasn't getting cleared after stoping other scripts, but this change introduces a subtle issue described below.
If a sprite is currently asking, but then some other code triggers that same sprite to "say" something (e.g. when [space] key pressed > say hello), stopping "other scripts in this sprite" has different behavior in Scratch 2.0 and 3.0. In 2.0, the 'hello' bubble is not cleared. With these changes, in 3.0, the 'hello' bubble is cleared because we are not differentiating between say bubbles and ask bubbles, and technically the sprite was still running the "ask and wait" block when we ran the stop block.
Steps to Reproduce
Compare the following in 2.0 and 3.0