Welcome to Learn To Build Your Own Blocks, we will look at how to make three different blocks today to get you started in BYOB. For this tutorial, you need to download BYOB 2.99 here, byob.berkeley.edu
Block 1: Previous Costume
There's next costume, and then for you to create, there is previous costume.
1. Go to Variables and click "Make a Block."
2. You see the object groups in the screen that pops up, select "Looks," then, where it asks what type of block, "command." At the very bottom of the screen, it has the blank line, this is where you block name goes, type, "previous costume." Press OK.
3. Now your in the main creation screen. There should be a purple previous costume block, within a hat block. Without exiting out of your screen, go to the Looks section of the blocks palette. Drag a "switch to costume" block into you window and connect it to the hat block.
4. Now for making it go to the previous costume. Go to Operators in the block palette. Take a "()-()" block out, and put it in the "switch to costume" block. In the "()-() block, drag a "costume#" block into the first hole, and type 1 in the second.
5. Your finished and your script should look like this:
6. Press OK
Block 2: animate costumes [] through []
1. Go to variables, click "make a block."
2. In this screen, select Looks again. Select command type block. Type "animate costumes through," in the naming space. Press OK>
3. Now you're in the main screen. To create the areas where you type numbers, you have to put variables. Notice how the addition signs appear when you go across the block? Click one of these and it asks you to name the variable. Between "costumes," and "through," make a variable called costume1. After "through," make a variable named costume.
4. Go to the Looks blocks, and insert a "switch to costume," block in your scripts. Where it says the costume name in that block, duplicate a costume1 variable and insert it there. Then put a "wait 1 sec," block after that. Now take a repeat until block, that says "repeat until costume# = costume." In the repeat loop, put "next costume, wait 1 sec."
5. Now your finished and the scripts should look like this:
Helpful User Comments:
Lucario621 wrote:
I have a suggestion for block 2:
This way, you can customize the speed
Plus, it was slightly optimized.meew0 wrote:
A block idea:
Jens wrote:
Hi meew0, cool! You just made you first E-shaped block with a new control structure that did not exist before. Just like Scratch has a "forever if" block you have invented your own "forever if else" block. I'm impressed!
I wrote:
meew0 wrote:
A block idea:
http://imgur.com/CnjUm.gifHey meew0, a cool feature about Scratch is remixing, and it's the same for BYOB apparently!
I've made you block easier for me to understand:
Last edited by soupoftomato (2010-05-01 21:51:20)
Offline
Bump, I finished it.
Offline
Hmmm, I didn't know 2.99 was released already *downloads*
Nice introduction, although I already knew how to do this
Last edited by technoguyx (2010-04-25 17:12:52)
Offline
I have a suggestion for block 2:
This way, you can customize the speed
Plus, it was slightly optimized.
Last edited by Lucario621 (2010-04-25 17:36:29)
Offline
Lucario621 wrote:
I have a suggestion for block 2:
http://i993.photobucket.com/albums/af54 … blocks.png
This way, you can customize the speed
Plus, it was slightly optimized.
I'll make a viewers comments section for useful things like that.
Offline
iCode-747 wrote:
Thanks so much! I really needed something like this.
Glad you like it!
Offline
soupoftomato wrote:
Lucario621 wrote:
I have a suggestion for block 2:
http://i993.photobucket.com/albums/af54 … blocks.png
This way, you can customize the speed
Plus, it was slightly optimized.I'll make a viewers comments section for useful things like that.
Ok! Cool!
Offline
Thanks for this!
Offline
Thanks everyone for the kind comments!!! Glad I could help you guys.
Offline
I found an error...
You put switch to costume costume number - -1.
Offline
Hi meew0, cool! You just made you first E-shaped block with a new control structure that did not exist before. Just like Scratch has a "forever if" block you have invented your own "forever if else" block. I'm impressed!
Offline
meew0 wrote:
A block idea:
http://imgur.com/CnjUm.gif
Awesome!
Offline
*agrees with the guy above me*
This new version of BYOB is a lot easier to handel than the last one where you had to type in all the different variables in the name of it.
Offline
Thanks all, I'm not at the right computer right now, but I am going to add a tutorial for how to make a {inverse of () ) block.
And meew0 and Jens, I'll add those *super helpful* comments to the Helpful User Comments section.
Last edited by soupoftomato (2010-04-26 16:14:22)
Offline
Added inverse block tutorial.
Offline
fg123 wrote:
BTW, it's -1 instead of 1 for the previous costume.
But it's already subtracting. - -1 is just like +1.
Offline