I noticed some time ago that it's possible to drag a variable block into many blocks' drop-down boxes, such as the broadcast block and the "go to" block, eliminating the need of lots of if blocks. I did a test just now and these blocks support fully this feature:
But there's still a lot of blocks that do have drop-down boxes, but don't support dragging variable blocks into them. Here's the full list:
It'd be really useful to support variable dragging into at least half of these blocks. With that feature in the key blocks, we'd be able to do key binding. On the variable blocks, changing different variables without many if/else conditionals. With the "advanced" operator block, a scientifical (sp?) calculator would be easier to make.
The blocks would only work if the variable attached has a valid string, obviously. Otherwise the block would have no effect in the script.
(FYI, if you don't know what a drop-down box is: http://en.wikipedia.org/wiki/Drop-down_list)
Offline
Some of those blocks just wouldn't make sense. The variable name would have to be specific, and in that case it's just so much simpler to use the drop-down box.
For example, the "When [drop-down box] key pressed" box is silly. Why not select something from the list?
But overall, nice idea.
Offline
BWOG wrote:
If the variable was set to "Hi I'm Bob" then how could you use it to set an effect?
It wouldn't work, in the same way you could set the variable to an unexisting sprite's name, and drag it to a Go To block - it wouldn't work either.
Chrischb wrote:
Some of those blocks just wouldn't make sense. The variable name would have to be specific, and in that case it's just so much simpler to use the drop-down box.
For example, the "When [drop-down box] key pressed" box is silly. Why not select something from the list?
But overall, nice idea.
Yes, we can select stuff from the list in When Key Pressed's case. But what is simpler, a single script with a variable in the drop-down box, or 41 copies of this script with different keys?
Offline
Good idea! It'd be great!
Offline
Chrischb wrote:
Some of those blocks just wouldn't make sense. The variable name would have to be specific, and in that case it's just so much simpler to use the drop-down box.
For example, the "When [drop-down box] key pressed" box is silly. Why not select something from the list?
But overall, nice idea.
Maybe if the variables fit into there, we'd get things like [When [;] key pressed]! We'd have more!
Offline
BWOG wrote:
If the variable was set to "Hi I'm Bob" then how could you use it to set an effect?
That's a good point as if that happen in the java player the whole script is voided and there would be even more errors.
Offline
BWOG wrote:
If the variable was set to "Hi I'm Bob" then how could you use it to set an effect?
You can name variables anything... so you can name a variable with a number and it'll work, and you can name a variable with a name and it won't work.
Offline
Jonathanpb wrote:
BWOG wrote:
If the variable was set to "Hi I'm Bob" then how could you use it to set an effect?
You can name variables anything... so you can name a variable with a number and it'll work, and you can name a variable with a name and it won't work.
Exactly my point. If the script doesn't work on the Java player it'll be the Scratcher's fault.
Offline
Whoa whoa whoa WHOA!
What is this "motor" block?
Offline
samurai768 wrote:
Whoa whoa whoa WHOA!
What is this "motor" block?
A LEGO WeDo block. Click on Edit, then Show Motor Blocks to see them.
Offline
Bump, so I can get some more opinions about it - and hopefully, opinions from the Scratch Team itself
Offline