Yes, it is.
Example:
[blocks]
<when[ a ]key pressed>
<set{ score }to( 1 )
<broadcast[ <{ score }> ]
<when[ b ]key pressed>
<set{ score }to( 2 )
<broadcast[ <{ score }> ]
<when I receive[ 1 ]
<forever>
<move( 5 )steps>
<if on edge, bounce>
<end>
<when I receive[ 2 ]
<forever>
<move( 7 )steps>
<if on edge, bounce>
<end>
[/blocks]You just cannot use when I receive "variable" because... just because it doesn't work...
Offline
If you don't take kayybee's method into acount, here is the answer:
You don't.
Not right now, at least. I'm hoping they will include that feature in 2.0.
Offline
Just Make a new "When I receive" hat block with the value of the variable. Then, when you broadcast the variable with that value, the hat block will be activated.
Offline
WCoaster wrote:
Justy because the scratch block is not programed to recieve a variable?
That is my fear any way.
It can. But it can only recieve those you made.
For example:
when green flag clicked
set broadcast to random 1 to 9
broadcast broadcast
you will have to make seperate number for each (1 to 9).
Offline
wei2912 wrote:
It can. But it can only recieve those you made.
For example:
when green flag clicked
set broadcast to random 1 to 9
broadcast broadcast
you will have to make seperate number for each (1 to 9).
Thanks wei, The broadcast a variable part I got but it is the recieve part that does not exist according to rubiks post.
I think I will research Paddles option.
Anyone have a good resource for programming blocks?
Thanks
Offline