go into control and click
command block. type in if = broadcast. then hover over if click the arrow and click reporter, name the reporter score( since this is a button mainly meant for scoring).
then hover over = and click to the right. then click the right arrow and click number. name it a and makes its default value 10 . then hover to the right of broadcast and click to the right. then click the right arrow and click any type and make its default value world. then put this script below
-----if score = a
-broadcast c
--------------------
please test it and put it on this page
Offline
jslomba wrote:
new BYOB block:http://megamod.weebly.com/uploads/7/1/5 … 828539.gif
scripts:
http://megamod.weebly.com/uploads/7/1/5 … 92.gif?523
jslomba, I think this block is a little too specialised for the library, it works fine for your project, I'm sure, but a lot of it is specific to that project and unchangeable through block arguments
Offline
sparks wrote:
jslomba wrote:
new BYOB block:http://megamod.weebly.com/uploads/7/1/5 … 828539.gif
scripts:
http://megamod.weebly.com/uploads/7/1/5 … 92.gif?523jslomba, I think this block is a little too specialised for the library, it works fine for your project, I'm sure, but a lot of it is specific to that project and unchangeable through block arguments
ok, that's fine
Offline
How easy would it be to host my own thing like johnnydean's online variable thing?
Offline
Also if you could host lists online too, you could effectively make some pretty good mmogs. Is that possible or likely to happen in the near futurE?
Offline
Move () Steps [ ]
By ProgrammingFreak
New DropDown:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].
moveStepsMenu Method
moveStepsMenu ^ #('left' 'right' 'down' 'up')
moveDirectionStep Method
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].
backward method:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.
down method
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.
up method
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.
BlockSpec:
('move %n steps %z' #- #moveDirectionStep:)
Ops: Motion
This block redoes the 'Move () Steps' block.
Offline
ProgrammingFreak wrote:
Move () Steps [ ]
By ProgrammingFreak
New DropDown:Code:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].moveStepsMenu Method
Code:
moveStepsMenu ^ #('left' 'right' 'down' 'up')moveDirectionStep Method
Code:
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].backward method:
Code:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.down method
Code:
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.up method
Code:
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.BlockSpec:
Code:
('move %n steps %z' #- #moveDirectionStep:)Ops: Motion
This block redoes the 'Move () Steps' block.
I believe someone has already tried to share this block. We turned it down on the basis that it can be done with single existing blocks
Offline
sparks wrote:
ProgrammingFreak wrote:
Move () Steps [ ]
By ProgrammingFreak
New DropDown:Code:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].moveStepsMenu Method
Code:
moveStepsMenu ^ #('left' 'right' 'down' 'up')moveDirectionStep Method
Code:
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].backward method:
Code:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.down method
Code:
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.up method
Code:
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.BlockSpec:
Code:
('move %n steps %z' #- #moveDirectionStep:)Ops: Motion
This block redoes the 'Move () Steps' block.I believe someone has already tried to share this block. We turned it down on the basis that it can be done with single existing blocks
Okay.
Offline
ProgrammingFreak wrote:
Move () Steps [ ]
By ProgrammingFreak
New DropDown:Code:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].moveStepsMenu Method
Code:
moveStepsMenu ^ #('left' 'right' 'down' 'up')moveDirectionStep Method
Code:
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].backward method:
Code:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.down method
Code:
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.up method
Code:
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.BlockSpec:
Code:
('move %n steps %z' #- #moveDirectionStep:)Ops: Motion
This block redoes the 'Move () Steps' block.
also, %z is already taken by the fraction menu.
Offline
ProgrammingFreak wrote:
Move () Steps [ ]
By ProgrammingFreak
New DropDown:Code:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].moveStepsMenu Method
Code:
moveStepsMenu ^ #('left' 'right' 'down' 'up')moveDirectionStep Method
Code:
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].backward method:
Code:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.down method
Code:
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.up method
Code:
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.BlockSpec:
Code:
('move %n steps %z' #- #moveDirectionStep:)Ops: Motion
This block redoes the 'Move () Steps' block.
The code won't even work right.
('move %n steps %z' #- #move:inDirection:) move: t1 inDirection: t2 'right' = t2 ifTrue: [self forward: t1]. 'left' = t2 ifTrue: [self backward: t1]. 'up' = t2 ifTrue: [self up: t1]. 'down' = t2 ifTrue: [self down: t1]
I think...
Offline
scimonster wrote:
ProgrammingFreak wrote:
Move () Steps [ ]
By ProgrammingFreak
New DropDown:Code:
$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].moveStepsMenu Method
Code:
moveStepsMenu ^ #('left' 'right' 'down' 'up')moveDirectionStep Method
Code:
moveDirectionStep: t1 'right' = t1 ifTrue: [self forward]. 'left' = t1 ifTrue: [self backward]. 'up' = t1 ifTrue: [self up]. 'down' = t1 ifTrue: [self down].backward method:
Code:
backward: t1 | t2 | t2_ 0 - t1. self forward: t2.down method
Code:
down: t1 | t2| t2_ self heading. self heading: 180. self forward: t1. self heading: t2.up method
Code:
up: t1 | t2| t2_ self heading. self heading: 0. self forward: t1. self heading: t2.BlockSpec:
Code:
('move %n steps %z' #- #moveDirectionStep:)Ops: Motion
This block redoes the 'Move () Steps' block.The code won't even work right.
Code:
('move %n steps %z' #- #move:inDirection:) move: t1 inDirection: t2 'right' = t2 ifTrue: [self forward: t1]. 'left' = t2 ifTrue: [self backward: t1]. 'up' = t2 ifTrue: [self up: t1]. 'down' = t2 ifTrue: [self down: t1]I think...
*facepalm to self*
Thats pretty plain to see. Since the direction methods need variables
Offline
jslomba wrote:
is TS still gonna do that update?
I'll do it... soon...
Offline
I downloaded BYOB and it is BEAST.
Offline
Panther is also beast.
Offline
hey, I just had a great idea:
maybe we could design a patch that you paste into the workspace that has all the new scratch blocks. we could also have a package for byob, and one for panther.
Offline
jslomba wrote:
new block:
blockspec:
('does %s contain uppercase letters??' #b #CS:)
code:
CS: str
| t1 |
t1_ str asLowercase.
str = t1 ifTrue: [^ 'false'].
^ 'true'
Improved:
CS: str ^str asLowercase = str
Offline
jslomba wrote:
hey, I just had a great idea:
maybe we could design a patch that you paste into the workspace that has all the new scratch blocks. we could also have a package for byob, and one for panther.
We discussed this a while back and the problem is that a user is unlikely to want to download every single block in the library so allowing a patch per block would be a better plan that we are already trying to create.
Offline
sparks wrote:
jslomba wrote:
hey, I just had a great idea:
maybe we could design a patch that you paste into the workspace that has all the new scratch blocks. we could also have a package for byob, and one for panther.We discussed this a while back and the problem is that a user is unlikely to want to download every single block in the library so allowing a patch per block would be a better plan that we are already trying to create.
alright, that's a betteridea, actually, having a patch for every block. it'll be easier for new scratchers. I can help, if you want.
Offline
jslomba wrote:
also, %z is already taken by the fraction menu.
I believe only %Z was shared not %z.
Offline