I am working on a project and I need something to replace this:
11 blocks
How do I make something like this:
10 blocks
11 vs 10 blocks, small difference here but a big difference for bigger projects.
P.S. for the default block you can make it a cap by duplicating the block definition of a cap block in Snap! 10.0 even though it is rendered as type 1 (command) in but the cap block is optional.
If you look above the simple if/else block in the control palette, you should see this block
which can be expanded to give the structure you are after
Note: to get the final else - just leave the else if set to true
but I cant do this
6 blocks
so i have to do this
7 blocks
7 vs 6 blocks, like I said, small difference here but a big difference for bigger projects.
em - unless I'm missing something, you can do exactly what the 1st script does
Try it for real and come back if it fails for you
Here we go:
Now place as you would do to make a swiitch-case then tada!
i will test this. this post will be the solution if it works
This is what I'd do
[edited to make a bit simpler]
thanks! It works!
P.S. I realised when you edit a duplicated cap block it turns back to a command so the default is a normal Cblock
or you can use the old library: