This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1301 2011-06-20 18:21:45

like2compute
Scratcher
Registered: 2010-10-22
Posts: 11

Re: ITopic: Welcome to your local block library!

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

 

#1302 2011-06-20 18:57:23

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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  hmm


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1303 2011-06-20 19:26:54

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

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  hmm

ok, that's fine


the the the the the

Offline

 

#1304 2011-06-21 11:18:51

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: ITopic: Welcome to your local block library!

How easy would it be to host my own thing like johnnydean's online variable thing?

Offline

 

#1305 2011-06-21 11:52:31

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: ITopic: Welcome to your local block library!

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

 

#1306 2011-06-21 16:25:13

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.

Offline

 

#1307 2011-06-21 16:29:16

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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  hmm


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1308 2011-06-21 16:34:04

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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  hmm

Okay.  sad

Offline

 

#1309 2011-06-21 18:24:47

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.


the the the the the

Offline

 

#1310 2011-06-21 19:03:19

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

This is why Panther changed it's arguments, so that it didn't run out when new ones were made!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1311 2011-06-21 19:14:17

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

This is why Panther changed it's arguments, so that it didn't run out when new ones were made!

yeah, that was a good edit.


the the the the the

Offline

 

#1312 2011-06-22 02:00:18

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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...

Offline

 

#1313 2011-06-22 06:15:36

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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  tongue

Offline

 

#1314 2011-06-22 10:15:47

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

is TS still gonna do that update?


the the the the the

Offline

 

#1315 2011-06-22 12:02:20

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

is TS still gonna do that update?

I'll do it... soon...

Offline

 

#1316 2011-06-22 13:31:07

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

jslomba wrote:

is TS still gonna do that update?

I'll do it... soon...

k, good. I've been waiting FOREVER


the the the the the

Offline

 

#1317 2011-06-22 18:15:03

designer45
Scratcher
Registered: 2011-01-17
Posts: 500+

Re: ITopic: Welcome to your local block library!

I downloaded BYOB and it is BEAST.  smile


http://www.uploadup.com/di-JOV6.jpg
Grr, I had no life outside of Miscellaneous. (lol jk) Click here to read my pokemon fanfiction! As of this update, jslomba has 2012 posts.

Offline

 

#1318 2011-06-22 18:41:09

designer45
Scratcher
Registered: 2011-01-17
Posts: 500+

Re: ITopic: Welcome to your local block library!

Panther is also beast.  smile


http://www.uploadup.com/di-JOV6.jpg
Grr, I had no life outside of Miscellaneous. (lol jk) Click here to read my pokemon fanfiction! As of this update, jslomba has 2012 posts.

Offline

 

#1319 2011-06-22 20:46:30

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.


the the the the the

Offline

 

#1320 2011-06-22 21:14:24

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

new block:

blockspec:

('does %s contain uppercase letters??' #b #CS:)

code:
CS: str
| t1 |
t1_ str asLowercase.
str = t1 ifTrue: [^ 'false'].
^ 'true'


the the the the the

Offline

 

#1321 2011-06-22 22:10:21

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

block suggestion:
      __
__/    \_________________________
|[set [variable]s view to [standard]|
|_       _________________________|
    \ _ /


the the the the the

Offline

 

#1322 2011-06-23 00:17:31

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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:

Code:

CS: str
^str asLowercase = str

Offline

 

#1323 2011-06-23 04:29:01

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1324 2011-06-23 09:03:38

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.


the the the the the

Offline

 

#1325 2011-06-23 14:04:10

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

also, %z is already taken by the fraction menu.

I believe only %Z was shared not %z.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer