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

#1251 2011-01-23 16:51:18

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

Re: Welcome to the OLD local block library!

@Pecola1: You forgot to write add in sensing ops

Code:

booleanAttributeNames
    ^ #('pen down' 'draggable' 'is a clone')

Last edited by scimonster (2011-01-26 08:37:21)

Offline

 

#1252 2011-01-23 17:01:43

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

Re: Welcome to the OLD local block library!

scimonster wrote:

@Pecola1: You forgot to write add in sensing ops

Code:

booleanAttributeNames
('pen down' ;draggable' 'is a clone')

THX


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

 

#1253 2011-01-24 03:28:37

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

Re: Welcome to the OLD local block library!

scimonster wrote:

improved version of the BYOB <x is between () and () >
http://www.freeimagehosting.net/uploads/b40516db61.gif

even more improved:
http://www.freeimagehosting.net/uploads/afc9daeb74.gif

Offline

 

#1254 2011-01-24 03:39:31

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

Re: Welcome to the OLD local block library!

2 more for BYOB. These are case blocks.
Lowercase:
http://www.freeimagehosting.net/uploads/7e163a17de.gif
The code:
http://www.freeimagehosting.net/uploads/0e1018f7ff.gif
Uppercase:
http://www.freeimagehosting.net/uploads/663eae41f3.gif
The code:
http://www.freeimagehosting.net/uploads/e02bf68180.gif
Note: These need the http://www.freeimagehosting.net/uploads/afc9daeb74.gif block referred to in the previous post.

Last edited by scimonster (2011-01-24 03:39:49)

Offline

 

#1255 2011-01-24 16:41:27

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

My block has a broken code. The (10) (+) (10) block's repaired code:

Code:

workOut: t1 with: t2 to: t3
t2 = '+' ifTrue: [^ t1 + t3].
t2 = '-' ifTrue: [^ t1 - t3].
t2 = '*' ifTrue: [^ t1 * t3].
t2 = '/' ifTrue: [^ t1 / t3].
^ 0

Marzipan11 must learn to not spoil

Offline

 

#1256 2011-01-25 15:12:09

PrincipalMcCarty
New Scratcher
Registered: 2011-01-25
Posts: 1

Re: Welcome to the OLD local block library!

Can you make blocks to sense/mess with folders as well as files?

Offline

 

#1257 2011-01-25 15:38:23

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

Re: Welcome to the OLD local block library!

I've never tried but I would be surprised if it wasn't possible...


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

Offline

 

#1258 2011-01-25 18:56:38

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

I have made a VERY useful block:

it is a sensing block that is used to put objects inside of variables:
the "This" block!
it is the most simple block i have ever seen but it is VERY useful,
here is the code:
if using Scratch BlockSpecs>sensing:

('This' #r #getthis)

if using ByOb BlockSpecs>sensing:

('This' r getthis)

in panther just put the code into a new block

code that goes in ScriptableScratchMorph>sensing ops:

getthis
          ^ self

and that's it! you can now have variables that hold sprites!
IF YOU USE THIS IN A SCRATCH MOD GIVE ME CREDIT!

p.s.
you can use this with any of the below blocks:
<distance to[ ]>
<touching[ ]>
<set{  }to( )>
<point towards( )>
<go to[ ]>

Offline

 

#1259 2011-01-25 19:05:57

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

Re: Welcome to the OLD local block library!

thanks frowned! a neat first contribution! I don't think you can demand credit, as several other people have come up with the self block and it's already been added to Panther1.1 but I look forward to more contributions from you!


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

Offline

 

#1260 2011-01-25 22:13:01

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

i tried your library's press green flag block, it does not seem to work...

Offline

 

#1261 2011-01-25 22:36:55

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

NEW BLOCK:

Clone and Broadcast to clone:

("broadcast to new clone %e" #- #cloneAndSend:)

THIS ONE IS ORIGINAL IF YOU INCLUDE IN MOD AND NOT IN PERSONAL VERSION YOU MUST CREDIT

Offline

 

#1262 2011-01-25 23:09:37

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

frowned wrote:

NEW BLOCK:

Clone and Broadcast to clone:

("broadcast to new clone %e" #- #cloneAndSend:)

THIS ONE IS ORIGINAL IF YOU INCLUDE IN MOD AND NOT IN PERSONAL VERSION YOU MUST CREDIT

IT IS ALREADY DEFINED. THAT IS NOT YOUR BLOCK.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#1263 2011-01-25 23:20:13

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

I Know But It Is An Implementation And I Found That Function!

Offline

 

#1264 2011-01-26 03:38:03

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

Re: Welcome to the OLD local block library!

... Keep calm guys, there's no need to shout, people are trying to work in here  smile


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

Offline

 

#1265 2011-01-26 08:34:07

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

Re: Welcome to the OLD local block library!

http://www.freeimagehosting.net/uploads/27c4285260.gif
http://www.freeimagehosting.net/uploads/021c656a5f.gif
http://i53.tinypic.com/5bqjxh.jpgI always test before uploading.

Last edited by scimonster (2011-01-26 08:35:45)

Offline

 

#1266 2011-01-26 08:37:01

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

Re: Welcome to the OLD local block library!

Pecola1 wrote:

scimonster wrote:

@Pecola1: You forgot to write add in sensing ops

Code:

booleanAttributeNames
('pen down' ;draggable' 'is a clone')

THX

Oops messed that up big!

Code:

booleanAttributeNames
    ^ #('pen down' 'draggable' 'is a clone')

Offline

 

#1267 2011-01-26 13:01:40

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

frowned wrote:

I Know But It Is An Implementation And I Found That Function!

But you can't take credit unless you CODED it.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#1268 2011-01-26 14:03:35

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

I have a correction to the press start button block:
the code says:

pressGreenFlag
     #pressGreenFlagButton

it should be this for it to work:

pressGreenFlag
               | t1 |
    t1 _ self ownerThatIsA: ScratchFrameMorph.
                t1 pressGreenFlagButton

Offline

 

#1269 2011-01-26 19:07:30

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

Re: Welcome to the OLD local block library!

frowned wrote:

I have a correction to the press start button block:
the code says:

pressGreenFlag
     #pressGreenFlagButton

it should be this for it to work:

pressGreenFlag
               | t1 |
    t1 _ self ownerThatIsA: ScratchFrameMorph.
                t1 pressGreenFlagButton

I have told sparks this before, however there is a simpler code than even you used:

Pecola1 wrote:

I figured out the
http://www.weebly.com/uploads/4/0/7/6/4076678/7422386.gif
has the wrong code. It wont work. You need to put:

Code:

pressFlag
    self broadcast: 'scratch-startclicked'

So it will turn to:
http://www.weebly.com/uploads/5/4/1/3/5413503/9291331.gif

Which also means instead of:
[blocks]<when green flag clicked>[/blocks]

you can do:
[blocks]<when I receive[ scratch-startclicked [/blocks]

or instead of:

[block]<forever>
<move( 10 )steps>
<end>[/blocks]

you can do:

<when green flag clicked>
<move( 10 )steps>
<broadcast[ scratch-startclicked

Last edited by Pecola1 (2011-01-26 19:08:12)


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

 

#1270 2011-01-26 19:15:21

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

Re: Welcome to the OLD local block library!

frowned wrote:

I Know But It Is An Implementation And I Found That Function!

If someone else made it even if you make it afterwards, its like me making the rotation style things, I didn't know that anyone had made it before but later i downloaded bingo and noticed, It wasn't a new discovery, however those scene blocks I made, WERE DISCOVERED BY ME AND NO ONE CAN PUT IT IN THEIR MOD WITHOUT USING MY NAME! AND EVEN THEN THEY BETTER ASK ME BEFORE PUTTING IT IN OR ELSE!


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

 

#1271 2011-01-26 23:13:24

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

set rotation center blockspecs:

('set rotation center %s' #-    #setrotationcenter:)

set rotation center code:

setrotationcenter: t1
                    costume rotationCenter = t1

syntax for usage:
"xpos@ypos"

also i will later post my sprite attachment blocks  cool

Offline

 

#1272 2011-01-27 03:59:32

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

Re: Welcome to the OLD local block library!

I think credit for a block should be given if the block is an as yet undiscovered combination of commands, but single method blocks that just use existing methods that have not been created are there for everyone to find - you didn't really come up with anything new. That's just my opinion, I'm happy to credit people anyway.


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

Offline

 

#1273 2011-01-27 04:22:26

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

Re: Welcome to the OLD local block library!

The BYOB error reporter isn't linking to the block makeup. Just to the picture of the block.

Offline

 

#1274 2011-01-27 12:04:20

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Welcome to the OLD local block library!

frowned wrote:

set rotation center blockspecs:

('set rotation center %s' #-    #setrotationcenter:)

set rotation center code:

setrotationcenter: t1
                    costume rotationCenter = t1

syntax for usage:
"xpos@ypos"

also i will later post my sprite attachment blocks  cool

but i did come up with this  big_smile

Offline

 

#1275 2011-01-27 14:57:01

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

Re: Welcome to the OLD local block library!

frowned wrote:

frowned wrote:

set rotation center blockspecs:

('set rotation center %s' #-    #setrotationcenter:)

set rotation center code:

setrotationcenter: t1
                    costume rotationCenter = t1

syntax for usage:
"xpos@ypos"

also i will later post my sprite attachment blocks  cool

but i did come up with this  big_smile

I do agree, you did, the rotation center/centre was already made though. I have not seen the set rotation center though.


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