Will Scratch 2.0 support the ability to run control blocks (e.g. Repeat until) until receiving a broadcast message?
Replies
Avron Stoloff
Member
February 26, 2013
Yes, you can use a variable, and that is what I have taught my students to do, but it is an extra step. It seems like incorporating support for using the broadcast as a condition would be something many people would naturally want to use.
Mark Willis
Member
February 26, 2013
A broadcast is an event. Expecting to test for it as a condition is not natural as you can't guarantee that the condition would be executing when the event is broadcast hence the need for a variable to store the fact that an event has happened. I'd even go as far to say that the condition would always be false and so the repeat would never end without using a variable. It would be the ultimate race condition and so not something that would be implemented.
Mark Willis
Member
February 26, 2013
Can't see a diffeence between 1.4 and 2 here. Can't you use a variable?
e.g. Broadcast "Something", When I receive "Something" then set "variable" to "true"
Yes, you can use a variable, and that is what I have taught my students to do, but it is an extra step. It seems like incorporating support for using the broadcast as a condition would be something many people would naturally want to use.
A broadcast is an event. Expecting to test for it as a condition is not natural as you can't guarantee that the condition would be executing when the event is broadcast hence the need for a variable to store the fact that an event has happened. I'd even go as far to say that the condition would always be false and so the repeat would never end without using a variable. It would be the ultimate race condition and so not something that would be implemented.
Can't see a diffeence between 1.4 and 2 here. Can't you use a variable?
e.g. Broadcast "Something", When I receive "Something" then set "variable" to "true"
then just have Repeat Until "variable" = "true"