Hey.
On my latest project I came across something which I think may help a few people in scratch. If you take a broadcast block:
[blocks]
<broadcast[ ]
[/blocks]
Then if you take a variable, you can put the variable inside the broadcast block.
What this block will do is, is broadcast the value of that variable. For example, if the value of a variable was 1, then the broadcast block would broadcast 1.
You then have to take a 'When I recieve [ ]' block and on the scroll down menu, click new... and then type in a value that you would assume the variable would change to. In this case, add '1'
Then, when ever the value of that variable is 1, it will broadcast the message '1' and a script which receives the '1' would then start.
It could be used in a lot of cases. For example, at the moment I am using it in a custom OS I am making, where each program has a value of a variable. For example, the paint editor would be value 1, then calculator would be value 2 etc. When the program changes, a few things need to be done, for example sprites need to be re-positioned. When the program changes, the broadcast block broadcasts the value for the new program and when a script recieves that value, it starts the script.
Hope I explained it clearly

Offline
Great explanation! You can also broadcast variable values that are words and letters, not just numbers. That might make it easier to understand the scripts...you can have "When I Receive Paint" to run the paint program for instance
Offline
Paddle2See wrote:
Great explanation! You can also broadcast variable values that are words and letters, not just numbers. That might make it easier to understand the scripts...you can have "When I Receive Paint" to run the paint program for instance
![]()
Of course! Nice idea. Forgot that they changed the blocks to support words now. Thanks P2S

Offline