This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2010-04-26 21:14:26

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

meew0 wrote:

A block idea:

http://imgur.com/CnjUm.gif

Hey 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:

http://img72.imageshack.us/img72/2475/0aforverifelseforever.gif


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#27 2010-04-26 22:00:26

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

um it says - -1 which is plus one, shouldnt it be minus one.


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#28 2010-04-26 22:08:02

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Why do you need an inverse of () block?

It's as simple as 0 - number! That makes a positive number a negative, and a negative number a positive! What's so complicated about that? Why is the script in the first post so complicated?


http://i.imgur.com/WBkM2QQ.png

Offline

 

#29 2010-04-27 12:06:07

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

I made a Int of () block!

http://img710.imageshack.us/img710/4742/intblock.gif


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#30 2010-04-27 12:23:26

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Ok, double posting i know but, I made an inverse block, P.s. this requires the Int of () block because of a calculation it has to make at the end, if you can find a solution, feel free to tell me.
http://img685.imageshack.us/img685/4300/inverseblock.gif


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#31 2010-04-27 19:11:19

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

markyparky, this is a beginners tutorial. I can't understand most of that.
EDIT: And how could an inverse block be that hard?

Last edited by soupoftomato (2010-04-27 19:12:07)


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#32 2010-04-27 19:19:19

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

markyparky56 wrote:

I made a Int of () block!

http://img710.imageshack.us/img710/4742/intblock.gif

I see a flaw though. What if the input does not include a period?

And also, perhaps you don't understand the BYOB process. At the end, you don't set the input to a new value - you have to do ' [report (int_list as text)] '.

Last edited by Lucario621 (2010-04-27 19:21:49)


http://i.imgur.com/WBkM2QQ.png

Offline

 

#33 2010-04-28 15:54:58

beetle16
Scratcher
Registered: 2010-03-28
Posts: 9

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Hi guys!

I saw the "Int of" block and think this is a good idea.
But your block needs to have a list named "int_list" and is really complex  smile

I've made a slightly optimized version of it. Hope you like it!
http://img707.imageshack.us/img707/9998/intof.gif

Greets, Beetle16

Offline

 

#34 2010-05-01 18:37:51

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

soupoftomato wrote:

Block 3: inverse of ()
This block gives the inverse (opposite) of a number.

1. Click "Make a block," and select "Operators," as the block group. For the type of block, you need to select the round, "reporter" block. In the naming bar, type, "inverse of." Press OK.

2. You should see the hat block with a block that says, "inverse of," in it. Remember how we added variables where the plus signs were last time? Do that after "of." When it asks for it's name, type, "number."

3. Because there are two types of inverses, positive, and negative. We need the script to check if the number is positive or negative. Put on if statement that says, "if number(the variable we made)> 0." And another if statement that says, "if number < 0."

4. Make a new variable called number1. In the first if, put "set number1 to (0-number). In the second if, put, "set number to (-1*number).

5. Now you're done and your scripts should look like this:

http://img213.imageshack.us/img213/2454/inverseof.gif

6. Press OK

Exactly what are you doing here?!
subtracting from zero and multiplying by negative one always produces the same result! I mean, really? I quote you saying, "two types of inverses, positive and negative." No there aren't. What the heck are you talking about. Are you trying to say, "the inverse of a positive number is negative, and the inverse of a negative number is positive"? Because its sign doesn't matter! Let's try a few examples, shall we?

#1: inverse of 3
0 - 3 = -3
3 * -1 = -3

#2: inverse of -10
0 - (-10) = 10
-10 * -1 = 10

#3: inverse of 0
0 - 0 = 0
0 * -1 = 0

I think that covers everything, doesn't it? See what I mean?

Last edited by nXIII (2010-05-02 11:50:43)


nXIII

Offline

 

#35 2010-05-01 20:36:54

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

nXIII wrote:

soupoftomato wrote:

Block 3: inverse of ()
This block gives the inverse (opposite) of a number.

1. Click "Make a block," and select "Operators," as the block group. For the type of block, you need to select the round, "reporter" block. In the naming bar, type, "inverse of." Press OK.

2. You should see the hat block with a block that says, "inverse of," in it. Remember how we added variables where the plus signs were last time? Do that after "of." When it asks for it's name, type, "number."

3. Because there are two types of inverses, positive, and negative. We need the script to check if the number is positive or negative. Put on if statement that says, "if number(the variable we made)> 0." And another if statement that says, "if number < 0."

4. Make a new variable called number1. In the first if, put "set number1 to (0-number). In the second if, put, "set number to (-1*number).

5. Now you're done and your scripts should look like this:

http://img213.imageshack.us/img213/2454/inverseof.gif

6. Press OK

Exactly what are you doing here?!
subtracting from zero and multiplying by negative one always produces the same result! I mean, really? I quote you saying, "two types of inverses, positive and negative." No there aren't. What the heck are you talking about. Are you trying to say, "the inverse of a positive number is negative, and the inverse of a negative number is positive"? Because its sign doesn't matter! Let's try a few examples, shall we?

#1: inverse of 3
0 - 3 = -3
3 * -1 = -3

#2: inverse of -10
0 - (-10) = 10
-10 * -1 = -10

#3: inverse of 0
0 - 0 = 0
0 * -1 = 0

I think that covers everything, doesn't it? See what I mean?

Wait, wait, wait... I think you made an error in you math!

#2: inverse of -10
0 - (-10) = 10
-10 * -1 = -10

-10 times -1 does not equal -1. To negative numbers produce a product of a positive number. I even checked it on my calculator.


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#36 2010-05-01 21:50:40

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

MathWizz wrote:

nXIII wrote:

soupoftomato wrote:

Block 3: inverse of ()
This block gives the inverse (opposite) of a number.

1. Click "Make a block," and select "Operators," as the block group. For the type of block, you need to select the round, "reporter" block. In the naming bar, type, "inverse of." Press OK.

2. You should see the hat block with a block that says, "inverse of," in it. Remember how we added variables where the plus signs were last time? Do that after "of." When it asks for it's name, type, "number."

3. Because there are two types of inverses, positive, and negative. We need the script to check if the number is positive or negative. Put on if statement that says, "if number(the variable we made)> 0." And another if statement that says, "if number < 0."

4. Make a new variable called number1. In the first if, put "set number1 to (0-number). In the second if, put, "set number to (-1*number).

5. Now you're done and your scripts should look like this:

http://img213.imageshack.us/img213/2454/inverseof.gif

6. Press OK

Exactly what are you doing here?!
subtracting from zero and multiplying by negative one always produces the same result! I mean, really? I quote you saying, "two types of inverses, positive and negative." No there aren't. What the heck are you talking about. Are you trying to say, "the inverse of a positive number is negative, and the inverse of a negative number is positive"? Because its sign doesn't matter! Let's try a few examples, shall we?

#1: inverse of 3
0 - 3 = -3
3 * -1 = -3

#2: inverse of -10
0 - (-10) = 10
-10 * -1 = -10

#3: inverse of 0
0 - 0 = 0
0 * -1 = 0

I think that covers everything, doesn't it? See what I mean?

Wait, wait, wait... I think you made an error in you math!

#2: inverse of -10
0 - (-10) = 10
-10 * -1 = -10

-10 times -1 does not equal -1. To negative numbers produce a product of a positive number. I even checked it on my calculator.

I'm just a fifth grader! And that post sounded really smart alec.

I got my information from Lucario621's post in some topic in the Suggestions. http://scratch.mit.edu/forums/viewtopic.php?id=34645

But know that I see that, it says use one of the following.

But, that post just basically said, "YOUR STUPID!"


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#37 2010-05-02 11:53:42

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

MathWizz wrote:

-10 times -1 does not equal -1. To negative numbers produce a product of a positive number. I even checked it on my calculator.

Wait a second, "-10 times -1 does not equal -1"?
And "To negative numbers produce a positive number"?
See, we both typed stuff wrong.

soupoftomato wrote:

I'm just a fifth grader! And that post sounded really smart alec.

I got my information from Lucario621's post in some topic in the Suggestions. http://scratch.mit.edu/forums/viewtopic.php?id=34645

But know that I see that, it says use one of the following.

But, that post just basically said, "YOUR STUPID!"

Wait, MathWizz's or mine?

Last edited by nXIII (2010-05-02 11:55:11)


nXIII

Offline

 

#38 2010-05-02 12:53:05

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

What if you do that inverse script with a non-number. It won't work, you can't really times a string or take 0 away from it can you? My one works fine with letters and numbers.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#39 2010-05-02 18:51:33

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

markyparky56 wrote:

What if you do that inverse script with a non-number. It won't work, you can't really times a string or take 0 away from it can you? My one works fine with letters and numbers.

There are inverses of words?

I just made it a number only block. (Not when I describe it, but my real block)


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#40 2010-05-03 02:55:10

addy107
Scratcher
Registered: 2009-01-10
Posts: 94

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

I have an idea Include BYOB in scratch 2.0


*Knock knock*/Whos there?/Scratch!/Scratch who?/Scratch Cat!

Offline

 

#41 2010-05-03 05:47:27

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

soupoftomato wrote:

markyparky56 wrote:

What if you do that inverse script with a non-number. It won't work, you can't really times a string or take 0 away from it can you? My one works fine with letters and numbers.

There are inverses of words?

I just made it a number only block. (Not when I describe it, but my real block)

Ofcourse, what if you want to say something backwards.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#42 2010-05-05 22:15:53

game011
Scratcher
Registered: 2010-02-13
Posts: 4

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

I need help making a clone me block anyone know how?

Offline

 

#43 2010-05-08 11:33:44

raghsthebest
Scratcher
Registered: 2009-08-31
Posts: 5

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

I was looking at ideas for blocks for 2.0, and I saw (letter () to () of ())
So........ I made it...........

http://img13.imageshack.us/i/script2w.jpeg/

It works!

http://img3.imageshack.us/i/script1.jpeg/

I hope that helped somehow  smile

Last edited by raghsthebest (2010-05-08 11:38:38)

Offline

 

#44 2010-05-09 22:07:23

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Does anyone think they can make a   do [  and [    E shaped block because I have been trying to do it and it didn't work. It would help with so many of my projects.

Last edited by ScratchReallyROCKS (2010-05-09 22:30:40)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#45 2010-05-10 03:15:04

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Hi ScratchReallyROCKS,

it's cool that you're experimenting with creating your own control structures in BYOB! If you're trying to make your sprite do several things at the same time you can try putting the LAUNCH block into the code for the second C-shaped command block. This should do the trick.

Gang, anybody care to create a tutorial for this?


Jens Mönig

Offline

 

#46 2010-05-10 06:41:40

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Jens wrote:

Hi ScratchReallyROCKS,

it's cool that you're experimenting with creating your own control structures in BYOB! If you're trying to make your sprite do several things at the same time you can try putting the LAUNCH block into the code for the second C-shaped command block. This should do the trick.

hey thanks Jens, I switched the RUN blocks in my custom block with LAUNCH blocks and it did exactly what I wanted it to  smile   smile

Actually, I could probably make a tutorial for this...

Last edited by ScratchReallyROCKS (2010-05-10 06:51:13)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#47 2010-05-10 07:52:35

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Hi, ScratchReallyROCKS, it's wonderful that you've found out how to get this going! You know, I just realized that there is probably no tutorial for the LAUNCH block at all at the moment. On the other hand, I'm pretty sure that many interested BYOBbers are asking themselves the same question you did. So, if you would be willing to create a tutorial, that would be awesome!


Jens Mönig

Offline

 

#48 2010-05-10 15:30:29

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Hey, Jens, I uploaded a project that shows how to make all the blocks I made in BYOB, So far it only has the do [ and [ block in it. I wish I could add more but I can't think of any. Anyone have any idea for a block that I could make?

hmm  And by the way, how do you add photos to forum posts? Then I could just post pictures instead of having to make project to show people things.

Last edited by ScratchReallyROCKS (2010-05-10 15:58:42)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#49 2010-05-10 17:41:15

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

Beautiful, ScratchReallyROCKS, thanks for posting!


Jens Mönig

Offline

 

#50 2010-05-22 07:21:59

jstout
Scratcher
Registered: 2007-05-04
Posts: 39

Re: Learn To Build Your Own Blocks - A Beginners Guide To BYOB

I wonder if we need think a bit more about the names we are using for parameters (we've never had to bother as much now). For example,

animates costumes [firstCostume] through [lastCostume] with a speed of [speed]

makes you think that to increase the speed of the animation you increase the last parameter, whereas you actually decrease it. We could change the 'name' of the block to ... with a delay of [delay] or alternatively change the wait to something like wait 10 - speed.

I know this goes someway against the philosophy of Scratch but I think it could be important.

Offline

 

Board footer