sparks wrote:
that looks... amazing! I could convert it to Panther except you would need seperate blocks... CYOB does not take dropdowns. Still, that's amazing!
Hey that's a cool idea why not add it
Offline
sparks wrote:
tomorrow... I'm doing german homework
Fine. German? Just translate it with the computer.
I want my block added!
It is the (if <> then () else () block period.
Blockspec and code
Below nXIII shortend it
Last edited by zorket (2010-09-30 17:04:07)
Offline
zorket wrote:
sparks wrote:
tomorrow... I'm doing german homework
Fine. German? Just translate it with the computer.
That always fails...
Offline
I've also started a glossary (go to the first post to get to it) that will hopefully help those who don't know what arguments or booleans are. Please feel free to contribute or suggest clearer definitions
Offline
You do almost the same with the <if <> then <> else <> block! Just a little sprinkle and you've got it!
Blockspec:
('if %b then %b else %b' #b #if:then:else:)
And you have it! If you didn't throw in the (if () then () else () block, you have to add the code.
If the code is there already, the block should work. I also want to... SHUT UP AND TELL US THE CODE ALREADY!
fine. Here you go:
if: t1 then: t2 else: t3 t1 ifTrue: [^ t2]. ^ t3
cool? if not, ask me question.
If you do not have the (if <> then () else () block,
Blockspec and code
Last edited by zorket (2010-10-01 17:55:35)
Offline
darn, that was a question. Guess I'll never know if you like Fez's or not...
so the code is the same as the if then else with strings not booleans? can't you make the one with booleans by using three if then else's?
does the same!
not that that's the point of the block sharing
Last edited by sparks (2010-10-01 16:06:38)
Offline
sparks wrote:
darn, that was a question. Guess I'll never know if you like Fez's or not...
so the code is the same as the if then else with strings not booleans? can't you make the one with booleans by using three if then else's?
http://www.weebly.com/uploads/4/0/7/6/4 … 93.gif?750
does the same!
not that that's the point of the block sharing
But then you couldn't put it in blocks like if <>
Last edited by SSBBM (2010-10-03 15:42:49)
Offline
SSBBM wrote:
sparks wrote:
darn, that was a question. Guess I'll never know if you like Fez's or not...
so the code is the same as the if then else with strings not booleans? can't you make the one with booleans by using three if then else's?
http://www.weebly.com/uploads/4/0/7/6/4 … 93.gif?750
does the same!
not that that's the point of the block sharingBut then you couldn't put it in blocks like if <>
true. I'll add it (this is where Panther's "$String$ as boolean" block comes in handy. Anyone code that to scratch?
Offline
I'm still charging alot of blocks!
The <true> block
category: operators
blockspec:
('true' #b #reportTrue)
reportTrue ^ true
Use: Reports true.
The <false> block
category: operators
blockspec:
('false' %b %reportFalse)
reportFalse ^ false
use: reports false.
I also still have <if <> then <> else <>.
Test these before you add them.
Last edited by zorket (2010-10-02 09:32:48)
Offline
Yo sparks, I would be honored if you put my block in panther! I am not so sure it has the right url plugin. I am going to try implementing it in the panther source. I want credit!
EDIT: You guys have changed the uncoloredArgMorph thing alot. I tried it and my block didn't work. Perhaps one of you could fix it?
Last edited by midnightleopard (2010-10-02 10:15:36)
Offline
Remix of my block on sensing: now it is (get (^)!
Credit to LS97
Blockspec: ('get %t' #r #getTime: 'date')
getTime: t1 t1 = 'date' ifTrue: [^ Date today]. t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )]. t1 = 'time' ifTrue: [^ Time now]. t1 = 'seconds' ifTrue: [^ Time now seconds]. t1 = 'minutes' ifTrue: [^ Time now minutes]. t1 = 'hours' ifTrue: [^ Time now hours]. t1 = 'weekday' ifTrue: [^ Date today weekday].
Code for scratch blocks > command block morph > private > uncolordArgMorphFor: add a strip:
$t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames; choice: ''].
Scratch objects > scriptable scratch morph, other ops:
timeNames ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )
Last edited by zorket (2010-10-06 15:46:33)
Offline
blockz
To shorten the code for your BYOB <if <> then <> else <> block:
(Hat) <if <> then <> else <>
<if> { if }
Report <{ then }>
<else>
Report <{ else }>
Last edited by zorket (2010-10-02 16:59:06)
Offline
SSBBM wrote:
sparks wrote:
darn, that was a question. Guess I'll never know if you like Fez's or not...
so the code is the same as the if then else with strings not booleans? can't you make the one with booleans by using three if then else's?
http://www.weebly.com/uploads/4/0/7/6/4 … 93.gif?750
does the same!
not that that's the point of the block sharingBut then you couldn't put it in blocks like if <>
Wait! You could put that in () = (true) and fit it in.
Offline
sparks wrote:
darn, that was a question. Guess I'll never know if you like Fez's or not...
so the code is the same as the if then else with strings not booleans? can't you make the one with booleans by using three if then else's?
http://www.weebly.com/uploads/4/0/7/6/4 … 93.gif?750
does the same!
not that that's the point of the block sharing
ALL codable blocks should be able to be scripted.
For example, the press green flag block:
[blocks]<broadcast[ scratch-startclicked[/blocks]
Besides you cannot fit circular blocks into booleans.
JUST ADD IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Last edited by zorket (2010-10-03 17:34:54)
Offline
My latest BYOB Operators creation
the variable strngs is in list form.
Offline