How to make a new block: (if<>then[]else[])

Your browser needs java to view projects. Click here to install Java.

user_icon billyedward shared it 10 months, 2 weeks ago
256 views, 2 taggers, 3 people love it, 1 remix by 1 person, 47 downloads, in 1 gallery
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
terminator68 terminator68 3 months, 2 weeks ago

These new blocks you create are very neat!! They can be very helpful too! Can you please reply on this comment when The new version of Streak comes out please? I CAN'T WAIT!!

mattenator mattenator 3 months, 3 weeks ago

i got a new icon!

billyedward billyedward 2 months, 3 weeks ago

Oh.

rubiks_cube_guy238 rubiks_cube_guy238 4 months, 1 week ago

I found an easier way to hack into Scratch. Instead of finding 'lots of text', (I was having trouble to find enough) download the project at this link (link to project)">(link to project) and export the sprite with the comment block, open it, and then you can continue.

billyedward billyedward 4 months, 1 week ago

Yes, I found that tone, too. However, for the purpose of a tutorial, it is kinda hard to explain all that in one. P.s. it is the 1.2beta comment block that causes the error.

TheoMarr TheoMarr 4 months, 1 week ago

Oh yeah and finally I'd like to get the Graphic Effect [] reporter block if possible?

billyedward billyedward 4 months, 1 week ago

Yes, that is very possible. However, There isn't enough room in this comment to explain it... But, it is in streak v0.1, available on the streak website.

TheoMarr TheoMarr 4 months, 1 week ago

How do I get the pi block then?

billyedward billyedward 4 months, 1 week ago

Well, here's how: In the scriptableScratchMorph class blockspecs area, under 'numbers' put ('pi' #r #piBlock). Then make a function, as shown here, that reads: (1st line) piBlock (2nd line)^ 3.141592 (end) That should make a pi block that gives the value of pi!

henley henley 5 months ago

and is there streak for the mac?

billyedward billyedward 5 months ago

Not really. However, the streak image file, documentation, and plugins are all cross platform. If you know how to make a mac installer, then please tell me. I will then upload the files for you.

henley henley 5 months ago

in numbers it only shows a command block that says "if"

billyedward billyedward 5 months ago

Did you type it exactly as the project showed?

(view all replies)
Markyparky Markyparky 5 months ago

this block dosen't really get used for much. what could it be used for??

billyedward billyedward 5 months ago

Well, for instance, to calculate vector angles based on two cartesian points, you will need either a 0-180 or 0-(-180) result set. This can be got with this block. Or, in a simpler instance, if there is 1 minute to, say , click a number of times (in one of your projects) and you record the number of clicks with the variable var, you could end the 1 min with: [say [(if <var > (10)> then: [Good! you clicked enough!] else: [Sorry! you didn't quite do it!])]]

(view all replies)
TheoMarr TheoMarr 5 months, 2 weeks ago

What new block would really help is "If I recieve []?" and "Hidden?". Those are both blocks that would really be useful, try and find a way for me to get them in Scratch 1.4!

billyedward billyedward 5 months, 2 weeks ago

Okay, hidden is REALLY easy to do. In the class side, under after it says 'looks' put ('hidden?' #b #isHidden). It doesn't even need a function. However, it is in Streak, so you can just use that. The trouble with a boolean broadcast is that for the boolean to return true, the broadcast must be sent exactly as the boolean in checked. Pretty slim chance.

the_programmer the_programmer 6 months, 3 weeks ago

I'm having trouble downloading Streak. the links to the image and executable files don't seem to work. Can you help?

billyedward billyedward 6 months, 3 weeks ago

Do they redirect you off of the Streak site? I have noticed this, and do realize that this is a problem. There is really nothing you can do, but I will comment when it is fixed.

(view all replies)
the_programmer the_programmer 7 months, 1 week ago

is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? no.is streak out yet? NO!!!!!!!!!!!!!!!!!!!!! okay, don't have to shout!!! Sheesh!!

billyedward billyedward 7 months ago

Allright! I have it out! I will have the installer made soon, but the image and exe is up for downloads at http://streak.t35.com/ . Just drop the image icon onto the exe to run.

the_programmer the_programmer 7 months ago

lol

billyedward billyedward 7 months ago

Even though the actual program is not uploaded, there is now a forum on the Streak site (streak.t35.com). So you can start adding to that!

billyedward billyedward 7 months, 1 week ago

Yes, and no. It is all out & ready (v0.1. Note that it does not contain all of the blocks in my real new blocks project, but most. They are all in 0.2). The problem is that The file is too large to transfer to my hosting site. I am working diligently to find an alternative, but so far, no luck. If you have any ideas, please tell me. Sorry for this inconvenience!

(view all replies)
the_programmer the_programmer 7 months, 2 weeks ago

is Streak out yet? I mean in any version.

billyedward billyedward 7 months, 2 weeks ago

sorry, thaat didn't work. Again: http://streak.t35.com/

billyedward billyedward 7 months, 2 weeks ago

Not yet. Keep checking <a href='http://streak.t35.com/'>http://streak.t35.com/</a>to see.

(view all replies)
pent9 pent9 7 months, 3 weeks ago

That's really helpful! except were do you find the text?

billyedward billyedward 7 months, 2 weeks ago

What do you mean by text? If you mean the code, I made it myself.

Scaper Scaper 8 months, 1 week ago

jeffy 24: he tells you how to make it work. Watch the whole thing.

Zen Zen 8 months, 2 weeks ago

I did'nt fully figure it out I only got to the "Do it" thingy whatever that does.

mina mina 8 months, 2 weeks ago

Is there a way to make blocks that allow you to hyperlink in Scratch?

billyedward billyedward 7 months, 2 weeks ago

Here, I've finished. Thanks again for the idea- making the block was not only rather easy, but fun, too! I hope you find it useful. (link to project)">(link to project)

mina mina 8 months, 2 weeks ago

Yes, that's what I mean and no, unfortunately I am not fluent in squeak. It would be really great if you made a tutorial for that!

(view all replies)
billyedward billyedward 8 months, 2 weeks ago

As in, to open a browser with a certain URL in it? Yes, there is, actually. You know that link to http://scratch.mit.edu">scratch.mit.edu on the 'done uploading' dialog? That would just have to be made so that a block triggers it, and it takes an argument as to which page it opens. Thank you for that Idea! If you are fluent in squeak, you should be able to figure it out. Otherwise, I will see if I can make a tutorial, but it will definitely be in streak sometime soon.

billyedward billyedward 9 months ago

Note to picky people: Before anyone leaves a comment on this, I'd like to mention that that 5 line function code can be shortened to only 3, and made faster, too. put this instead: (1st line)if: t1 Then: t2 Else: t3 (2nd line)t1 ifTrue: [^ t2](3rd line)ifFalse: [^ t3].

jeffy24 jeffy24 9 months, 1 week ago

<if <> then <> else <>> block didnt work

billyedward billyedward 9 months, 1 week ago

You mean the boolean one? Ensure that the definition syntax is exactly ('if %b then %b else %b' #b #ifThenElse). One common mistake is to mistype the function name (ifThenElse). Ensure that you type the capitals correctly, as squeak is case sensitive.

(view all replies)
jeffy24 jeffy24 10 months ago

That was helpful... BUT HOW THE **** DO I GET IT BACK?!?!?!?!??!?!??!?!?!??!?!?!?!??!?!?!??!?!?!?

billyedward billyedward 10 months ago

What do you mean by 'it?'

(view all replies)
Paddle2See Paddle2See* 10 months, 1 week ago

Hey Billy...here are the instructions for increasing your Java Heap. I think I wrote them up for 128Mb...you might want to increase that some. (link to forums)">(link to forum)

billyedward billyedward 10 months, 1 week ago

Thanks!!!!!!!!!!!!!!!!

SeanCanoodle SeanCanoodle 10 months, 2 weeks ago

That's really clever! It also helped explain to me how custom blocks work.

billyedward billyedward 10 months, 2 weeks ago

Yes. If you are interested in making your own blocks, Jens' 'BYOB' may be for you. It is at: http://www.chirp.scratchr.org/blog/?p=19

woofwoof301 woofwoof301 10 months, 2 weeks ago

AWESOME! I can hack now! But.... when I download it, what do I save it as?

billyedward billyedward 10 months, 2 weeks ago

Whatever. To actually save the *.image file, with your changes, click 'save as' from the world menu.

(view all replies)
Please Wait...