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:
Offline
um it says - -1 which is plus one, shouldnt it be minus one.
Offline
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?
Offline
I made a Int of () block!
Offline
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.
Offline
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)
Offline
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)
Offline
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
I've made a slightly optimized version of it. Hope you like it!
Greets, Beetle16
Offline
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:
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)
Offline
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 OKExactly 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 = 0I 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.
Offline
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 OKExactly 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 = 0I 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!"
Offline
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)
Offline
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.
Offline
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)
Offline
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.
Offline
I was looking at ideas for blocks for 2.0, and I saw (letter () to () of ())
So........ I made it...........
It works!
I hope that helped somehow
Last edited by raghsthebest (2010-05-08 11:38:38)
Offline
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)
Offline
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?
Offline
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
Actually, I could probably make a tutorial for this...
Last edited by ScratchReallyROCKS (2010-05-10 06:51:13)
Offline
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!
Offline
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?
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)
Offline
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