Pages: 1
... blocks. any way, start up the scratch source code or just open scratch and shift-click the R in the scratch logo, then, click the gray space in the corner, then press "open..." then "browser", then, in the window that comes up, click "scratch-objects" then "scriptableScratchMorph", now, delete all of the text in the box at the bottom of the window, and type
if: t1 then: t2 else: t3
and then right click and press "accept", then, under the text, type
t1 ifTrue: [^ t2].
^ t3then, right click and press accept, then click the button that says "scriptableScratchMorph" and then press class then click "Block specs" (if your using a mac, then click "scratch") and then block-specs in the next box to the right, now, find where it says "('not %b' #b #not)" and to the right of that type
('if %b then %s else %s' #r #if:then:else:) ('if %b then %b else %b' #b #if:then:else:)then right click and press "accept" and then exit the window and turn the full screen off, and then save the image, and scratch should close, then open it back up and now you have the blocks!
EDIT: okay, I fixed the bug.
Last edited by gabe3 (2010-08-05 00:20:45)
Offline
I believe you mean:
t1 ifTrue: [^ t2].
^ t3With what you had, it would report t2 if t1 was false, and and true if it was true!
Offline
Oh, that was a typo, thanks! I did it right on my PC, but I made a typo in the form!
Offline
that's a pretty easy code.
it can also be easily scripted using normal scratch blocks...
but it's still good to have (in fact, bingo has it too)
Offline
this is not an easy way to create a Scratch block this is a hard way to create a Scratch block<say[
Offline
rawleybrick wrote:
this is not an easy way to create a Scratch block this is a hard way to create a Scratch block<say[
YouFail.
Offline
It doesn't work...
Offline
i would suggest having it in:
Scratch-Objects --> ScriptableScratchMorph --- instance --> string ops --> [any of them]
Offline
http://scratch.mit.edu/forums/viewtopic.php?pid=487363#req_message[image] boom! to hard
Offline
Pages: 1