i think that for another version of scratch you should have a receive block that can go inside a script.
Offline
I don't quite see how a recieve block in a script would work. The script would have to "jump" to the receive block (since broadcasts are events and don't "persist"). In this case, it would be pretty much acting like a "Hat" anyway.
The desired result could probably be obtained by having the script test the value of a global variable (a variable available to all sprites, which is the default). If another Sprite/Script changes the variable, the Script in question can react to this "silent broadcast".
Offline
See http://scratch.mit.edu/forums/viewtopic.php?id=717. I wanted this since, like, a long time ago!
Offline
Sorry to disappoint the "I thought of it first" folks, but this idea has been kicking around longer than the web site. I don't think I was the first to suggest a test for having received a message, but I have an email I sent to the scratch team during beta testing
(18 Dec 2006)
...
5) Need a repeat..until loop. There are a lot of times that
we'd like to run something "forever", only not quite.
For example, in a dnace routine, it would be nice to have
repeat
broadcast start_beat
wait <beat>
until receive dance_over
I'd be happy if receiving the message always
terminated the loop, no matter where in the body you are.
Right now there is no way out of a forever loop, other than
by stopping all scripts.
They did eventually put in the repeat-until, but not the test for receiving a message.
Offline