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

#3251 2013-01-19 13:50:24

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

Another BYOB block inbound from me!

Okay, this block is VERY simple, and I only made it because I don't like the text.

THE BLOCK IS: list[1]
If you know Lua, or any language similar to it, you may recognise this block as a way of getting an item of a list. Of course, that's what it does.
Downloads: Here!
Pictures: - Block look,
- Code


I'm back.
Maybe.

Offline

 

#3252 2013-01-24 10:34:49

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Hey, does any librarian have plans for S2.0? I'd love to have a gallery or something with MaB blocks from users, I'm willing to do it if nobody else wants (But I'd need the password  wink  )

Offline

 

#3253 2013-01-24 16:12:56

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

roijac wrote:

Hey, does any librarian have plans for S2.0? I'd love to have a gallery or something with MaB blocks from users, I'm willing to do it if nobody else wants (But I'd need the password  wink  )

I think that may be a good idea.  Galleries are known as "studios" in 2.0, though.   wink

I would like to hear other librarians' opinions.

Offline

 

#3254 2013-01-25 21:35:52

Magma-Tak
New Scratcher
Registered: 2013-01-25
Posts: 33

Re: ITopic: Welcome to your local block library!

Nice blocks!

Offline

 

#3255 2013-01-26 12:54:34

elfin8er
Scratcher
Registered: 2012-01-15
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Anyone have a panther block to run a program on your computer, or to run a batch script?

edit: nvm. I can just use the Open URL block.

Last edited by elfin8er (2013-01-26 13:01:52)


http://i1340.photobucket.com/albums/o723/stevetheipad/goldlittlesig.png

Offline

 

#3256 2013-01-26 17:33:41

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: ITopic: Welcome to your local block library!

BYOB Blocks:
http://i47.tinypic.com/wvwpok.gif
and
http://i50.tinypic.com/2h82vc6.gif
download(both) here
almost the same thing  wink

Offline

 

#3257 2013-01-26 17:37:27

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

I have a block to submit, If you've used Lua you may understand it, if not, I'll provide a handy link to a page to explain what it means. Here it is!
Anyway here's the block! It's name is string.gsub and it's purpose is to find a substring in a string and if it matches the 2nd input then replace it with the third.
BLOCK LOOKS: HERE
CODE: HERE
BLOCK'S OUTPUT: HERE
BLOCK DOWNLOAD: HERE
EDIT: Oops. I did somthing wrong. Fixed!

only works with words. without download you can tell that

(string.gsub [helloworld], [lowo], [lo wo])
will report helloworld

Offline

 

#3258 2013-01-27 10:33:22

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

Re: ITopic: Welcome to your local block library!

I have a new pen block for scratch

http://i50.tinypic.com/2d1337r.gif

blockspec:

Code:

('stamp text %s at x: %n y: %n font: %G size: %n color: %c' #- #stamp:X:Y:Font:Size:Color:)

code:

Code:

stamp: t1 X: t2: Y: t3 Font: t4 Size: t5 Color: t6

| stage form canvas |
(stage := self ownerThatIsA: ScratchStageMorph) ifNotNil: [stage createOrResizeTrailsForm. form := stage penTrailsForm] ifNil: [^self]. canvas := FormCanvas on: form. canvas text: t1 at: t2+240@(t3 negated + 180) font: (StrikeFont fontName: t4 size: t5) color: t6. stage changed.

Scratch-Blocks>ConnamdBlockMorph>uncoloredArgMorphFor:

Code:

$G = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #fontNames; choice: 'Times New Roman'].

Some more code:

Code:

fontNames
^ UnicodePlugin getfontList

Last edited by jslomba (2013-01-27 13:33:10)


the the the the the

Offline

 

#3259 2013-01-27 10:49:43

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Interest wrote:

BYOB Blocks:
http://i47.tinypic.com/wvwpok.gif
and
http://i50.tinypic.com/2h82vc6.gif
download(both) here
almost the same thing  wink

If 2 scripts are very similar except for one small thing, consider combining them.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#3260 2013-01-28 00:04:41

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: ITopic: Welcome to your local block library!

joefarebrother wrote:

Interest wrote:

BYOB Blocks:
http://i47.tinypic.com/wvwpok.gif
and
http://i50.tinypic.com/2h82vc6.gif
download(both) here
almost the same thing  wink

If 2 scripts are very similar except for one small thing, consider combining them.

the point is, you can't without a dropdown menu or an input, which would be very unwieldy

Offline

 

#3261 2013-01-28 11:36:20

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Interest wrote:

joefarebrother wrote:

Interest wrote:

BYOB Blocks:
http://i47.tinypic.com/wvwpok.gif
and
http://i50.tinypic.com/2h82vc6.gif
download(both) here
almost the same thing  wink

If 2 scripts are very similar except for one small thing, consider combining them.

the point is, you can't without a dropdown menu or an input, which would be very unwieldy

You could use an input that is a procedure.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#3262 2013-02-02 16:58:15

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: ITopic: Welcome to your local block library!

here are two of my blocks  smile  (for scratch)
block 1
image at: https://527c7291-a-62cb3a1a-s-sites.googlegroups.com/site/myscratchblocks/home/screenshot45.png?attachauth=ANoY7cpnD8rR51sN58q28zy0x7JOvOCff9ZDG8_OZH7jHPf6cPVWwcdeHfcVLmkNItU_okgkcuGFw9z6RgTt-wNH7qjhhKP7KTd03ocn7rvFBHnFIvE7VAY-Rj26ax2FXc7sc3LSbeTZOOnVfJdwGO0GndJkr14GDU3xyWNPsuXg3AIL0jofeixW0waDT0LtpmFlcSvKB6vt3jZn7Nu3nwDsna81Bm68C1XOVKLited0gmlEFY4z2Ec%3D&attredirects=0
blockspec

Code:

('%s <= %s' #b #lessEqual:equalLess:)

Code

Code:

lessEqual: t1 equalLess: t2
      t1 = t2 ifTrue: [^ true].
      t1 < t2 ifTrue: [^ true].
      ^ false

now block 2
image at: https://527c7291-a-62cb3a1a-s-sites.googlegroups.com/site/myscratchblocks/home/screenshot45.png?attachauth=ANoY7cqPVAjRrrvGxOY2d6-ykXxVkTXNMpFBOcmqOgYwL1MCaAkwn-Qu4tzY-mS_FJ_iGt9oT6JWXrS-MlgA2ErtVodm6sC43id7siG-XhpG-gQHAKasqt69LcAtAKLNqz0RPVouNaNtG7d6UMOGyZhRYelgbNai8U4eKNMCC7PXyTdyGISVWrWAPwUFChykks8DcYnPjkHuZ6xHgUE5FYhf7jl5N0FnkJqCYGEvw0G6tNiwOJAs-a8%3D&attredirects=0

Code:

('%s => %s' #b #greatEqual:equalGreat:)

Code

Code:

greatEqual: t1 equalGreat: t2
      t1 = t2 ifTrue: [^ true].
      t1 > t2 ifTrue: [^ true].
      ^ false

And there, a <[] <= []> (less than or equal) and <[] => []> (greater than or equal) block!


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#3263 2013-02-07 13:16:32

Devloper123
Scratcher
Registered: 2011-11-27
Posts: 100+

Re: ITopic: Welcome to your local block library!

New BYOB Blocks
Detect if offline/online
REQUIRES Variable:Online/Offline
script
set "Offline/Online" to [Online]
obselete!
set "Offline/Online" to [Online]

Detect Player
REQUIRES Variable:Playing
set"Playing" to [Offline]
brodcast (0/0)
set [playing] to [Online Java]
obsolete!
set [Playing] to [Flash]

Set colour effect to random
NO VARIABLES

forever
set colour effect to (pick random(1) to (10)
/forever


http://i45.tinypic.com/2jafczs.gifAnd Dev! Sign up on this forum!i like the  tongue  emoticon

Offline

 

#3264 2013-02-15 14:46:54

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: ITopic: Welcome to your local block library!

Here is a while block, I found it while looking in the c blocks. This one was disabled i think... well anyways...
blockspec

Code:

 ('while %b' #c #doWhile)

That is it! Just the block spec, nothing else needed.  smile


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#3265 2013-03-02 09:05:45

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: ITopic: Welcome to your local block library!

Just a suggestion but can people please put the code that you put in the source code as well as the one to go into normal scratch because I'm trying to make a mod (using the source code) and when I put some of the blocks from here in, they don't work, even when I've got rid of hashes. Or can someone at least explain all the differences between the source code and normal scratch (as in tabs, hashes and other syntax/grammar changes as opposed to 'you can't upload with the source code'). Any help would be greatly appreciated.

Offline

 

#3266 2013-03-03 16:31:31

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: ITopic: Welcome to your local block library!

i am doing the <last said is [hello]?> block.
first goto: Scratch-Objects >> ScratchSpriteMorph >> lookOps >> say:
Then add
Said _ t1.
WARNING: Saying must be a global variable! to do that. Just accept with that, then declare as global variable.
Also add the above code to
say:duration:elapsed:from:
Then goto class, blockspecs, blockspecs.
add
('last said was %s?' #b #lastSaid:'Hello!')
Then goto instance, look ops and add:
lastSaid: t1
    t1 = Said ifTrue: [^ true].
    ^ false

Last edited by SFollis (2013-03-03 16:32:33)


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#3267 2013-03-03 22:50:43

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: ITopic: Welcome to your local block library!

SFollis wrote:

i am doing the <last said is [hello]?> block.
first goto: Scratch-Objects >> ScratchSpriteMorph >> lookOps >> say:
Then add
Said _ t1.
WARNING: Saying must be a global variable! to do that. Just accept with that, then declare as global variable.
Also add the above code to
say:duration:elapsed:from:
Then goto class, blockspecs, blockspecs.
add
('last said was %s?' #b #lastSaid:'Hello!')
Then goto instance, look ops and add:
lastSaid: t1
    t1 = Said ifTrue: [^ true].
    ^ false

No, NO!! global variables should be avoided if possible!
use an instance variable for ScriptableScratchMorph instead

Offline

 

#3268 2013-03-04 15:39:24

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Interest wrote:

No, NO!! global variables should be avoided if possible!

Every single metaclass instance for a named class is a global variable. I wouldn't recommend avoiding those!  wink


nXIII

Offline

 

#3269 2013-03-06 17:18:57

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: ITopic: Welcome to your local block library!

Interest wrote:

SFollis wrote:

i am doing the <last said is [hello]?> block.
first goto: Scratch-Objects >> ScratchSpriteMorph >> lookOps >> say:
Then add
Said _ t1.
WARNING: Saying must be a global variable! to do that. Just accept with that, then declare as global variable.
Also add the above code to
say:duration:elapsed:from:
Then goto class, blockspecs, blockspecs.
add
('last said was %s?' #b #lastSaid:'Hello!')
Then goto instance, look ops and add:
lastSaid: t1
    t1 = Said ifTrue: [^ true].
    ^ false

No, NO!! global variables should be avoided if possible!
use an instance variable for ScriptableScratchMorph instead

It doesn't let me  hmm


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#3270 2013-03-07 12:27:46

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: ITopic: Welcome to your local block library!

Hi, can I have help with a 2 blocks I'm trying to make please? The first is a 'make [sprite 1 v] do' c block. I know it's probably quite simple but I don't understand how c-blocks work. The second is like the reverse, scramble and do blocks, but uses a dropdown menu containing 'reverse' 'scramble' and 'do' because three extra c-blocks take up a lot of room in the control pallette. Thanks!

Offline

 

#3271 2013-03-20 21:10:32

Epicness123
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: ITopic: Welcome to your local block library!

i dont really get this its confusing


I am Epicness123,and I rock!

Offline

 

#3272 2013-03-20 21:13:01

Epicness123
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: ITopic: Welcome to your local block library!

and im beginning to think this uses something else,i want to make a block but i dont know what to do,and ive read everything


I am Epicness123,and I rock!

Offline

 

#3273 2013-03-21 19:23:20

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: ITopic: Welcome to your local block library!

wondering, if we are makeing a mod, can we use these blocks?


http://i45.tinypic.com/s4nvxl.png

Offline

 

#3274 2013-03-29 11:23:28

mrsrec
Scratcher
Registered: 2010-11-14
Posts: 100+

Re: ITopic: Welcome to your local block library!

The Block Library Is Dead.


Scratchy Scratcher Scratched Scratch Scratches When He Scratchy Scratches Scratch Projects. These Scratch Projects Were Started From Scratch.
http://internetometer.com/image/37716.png

Offline

 

#3275 2013-04-01 16:18:21

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: ITopic: Welcome to your local block library!

mrsrec wrote:

The Block Library Is Dead.

how is it dead?


http://i45.tinypic.com/s4nvxl.png

Offline

 

Board footer