I would save A LOT of scripts if there was an "i recieve" block. Quote this if you agree.
Offline
This has been suggested many, many times - it won't happen because "I receive" isn't a boolean statement.
The <[ ] received?> fictional block would do the same as you're asking, however - and it is boolean. So many people want it that it might appear in Scratch 2.0...
Offline
only true for 1 millisecond...
Last edited by joefarebrother (2011-07-31 12:33:16)
Offline
The "I Receive" block already exists. It's a "hat", because a broadcast is an "event".
It will always be a hat block, as it just doesn't make sense otherwise. If you need to have a broadcast cause something to change in a running script, you must use the "event" triggered by the broadcast to change a variable and have that variable cause the change you want. Example:
Forever If (GameOn = 1)
do game related stuff
more game stuff
etc.
When I Receive (GameOver)
Set GameOn = 0
This stops the script that runs the "game".
Offline