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

#376 2010-05-18 12:26:27

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

nXIII wrote:

randalpik wrote:

randalpik wrote:

Where is the code for the "set variable to" and "change variable by" blocks? Because I am working with variable manipulation while a script is running, I need to find them in order to change them to a string box from the drop-down list.

Never mind... I think I have it now

Oh, because we wouldn't know where you got THAT idea from....  roll

no, just because panther has it, doesnt mean everyone took it from there. i had loads of ideas before panther:
- the 'key pressed' reporter (i was in italy when i made that one)
- the 'switch costume to camera' block
- the date/time block
- the change variables and lists to string inserters
- the constant value in operators (even though mine has a string inserter, not menu)

Offline

 

#377 2010-05-18 13:03:11

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Cool custom blocks in Scratch

TheGameMaster1231 wrote:

And nXIII, I'm not accepting your big 'talk' about stealing the blocks from panther, because panther's file I/O, clone/delete, and all the other blocks that are hacked command blocks DO NOT work for me. so I'm not accepting it.

That comment makes no sense.

Clone/delete do work, I/O works, we have one set up to inform us when someone downloads. hacked command blocks? Nothings been hacked, we're created new blocks. The recived? block requires the hat block to check if its been recived (as the name suggests) Are you perhaps using a mac? If so then that might be why.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#378 2010-05-18 14:19:27

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

Re: Cool custom blocks in Scratch

TheGameMaster1231 wrote:

Can Anybody Get The Clone Block That Works In Presentation Mode? I Already Have The Delete Block Work, But Not The Clone. Please Help!

And nXIII, I'm Not Accepting Your Big 'Talk' About Stealing The Blocks From Panther, Because Panther's File I/O, Clone/Delete, And All The Other Blocks That Are Hacked Command Blocks DO NOT Work For Me. So I'm Not Accepting It.

Um.... wait what are hacked command blocks?

EDIT: Oh, yea, MP56 already said this, but BTW that makes absolutely no sense... please explain.

LS97 wrote:

nXIII wrote:

randalpik wrote:

Never mind... I think I have it now

Oh, because we wouldn't know where you got THAT idea from....  roll

no, just because panther has it, doesnt mean everyone took it from there. i had loads of ideas before panther:
- the 'key pressed' reporter (i was in italy when i made that one)
- the 'switch costume to camera' block
- the date/time block
- the change variables and lists to string inserters
- the constant value in operators (even though mine has a string inserter, not menu)

- key pressed wasn't my idea... I just implemented it in shadow_7283's thread about that block. I guess great minds think alike!  wink
- Wait, the one with or without the dialog? 'Cause I'm pretty sure that no one made the one without the dialog before me ... trust me, it's pretty hard.
- Er, that was actually billyedward's. That's why it says special thanks to billyedward in the help.
- Yes, but not ones with MENUS! (and I had that idea a REALLY long time ago, back when MathWizz and I had identical ideas at the same time...)
- Er, again I didn't see yours, just made this one by myself.

Lastly, for the people who actually hack Panther and care about it, (wow, that really trims down the numbers) I completely redid the arguments in the blockSpecs ... please don't tell me THAT was your idea.

Last edited by nXIII (2010-05-18 14:25:52)


nXIII

Offline

 

#379 2010-05-18 14:38:29

dav09
Scratcher
Registered: 2009-03-25
Posts: 1000+

Re: Cool custom blocks in Scratch

one prob with something. how do you get a cheque box? like next to the block(like variable) thanks

Last edited by dav09 (2010-05-18 14:45:55)

Offline

 

#380 2010-05-18 17:26:40

steve1234
Scratcher
Registered: 2009-09-19
Posts: 22

Re: Cool custom blocks in Scratch

how do u make a "new varible" block?


http://i158.photobucket.com/albums/t81/pjcountry41/bully%20backgrounds/bluefire.jpg

Offline

 

#381 2010-05-18 18:52:45

Jakey22
Scratcher
Registered: 2008-12-28
Posts: 72

Re: Cool custom blocks in Scratch

Sperry wrote:

Jakey22 wrote:

Sperry wrote:


I think it is:

Code:

if: t1 contains: t2
^ (t1 findString: t2)

Does that work?

I tried it and it didn't work, although I might have written the block-specs wrong. also, it is supposed to be a boolean.

Sorry, that didnt work. Try this:

Code:

if: t1 contains: t2
((t1 findString: t2) > 0) ifTrue: [^ true]
^ false

Code:

('%s contains %s' #b #if:contains:)

That better?

I get the "Nothing more expected" error just before the  ^ false


http://www.imagebookers.com/gallery/d/2561-1/ubuntu-wallpaper.png http://bullylug.org/linux-penguin.jpg
My website       PENGUINS!!!!!!!!!!!!!!!!!!!!! randomness.

Offline

 

#382 2010-05-18 19:35:19

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

Re: Cool custom blocks in Scratch

A little note to people:

(someCondition) ifTrue: [^ true].
^ false.

is a much-too-long way of this:

^ someCondition


nXIII

Offline

 

#383 2010-05-18 21:21:11

randalpik
Scratcher
Registered: 2008-07-27
Posts: 82

Re: Cool custom blocks in Scratch

nXIII wrote:

A little note to people:

(someCondition) ifTrue: [^ true].
^ false.

is a much-too-long way of this:

^ someCondition

We know. At least the smart people here do.  tongue


My stuff: http://scratch.mit.edu/users/randalpik
Your face: Look at a gopher

Offline

 

#384 2010-05-18 21:33:30

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

Re: Cool custom blocks in Scratch

randalpik wrote:

nXIII wrote:

A little note to people:

(someCondition) ifTrue: [^ true].
^ false.

is a much-too-long way of this:

^ someCondition

We know. At least the smart people here do.  tongue

You still never told me how my message received block works.


nXIII

Offline

 

#385 2010-05-18 23:53:46

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Cool custom blocks in Scratch

dav09 wrote:

one prob with something. how do you get a cheque box? like next to the block(like variable) thanks

its "check" and it should be there automatically

Last edited by Joeman592 (2010-05-18 23:54:03)


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#386 2010-05-19 06:09:21

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Cool custom blocks in Scratch

Jakey22 wrote:

Sperry wrote:

Jakey22 wrote:

I tried it and it didn't work, although I might have written the block-specs wrong. also, it is supposed to be a boolean.

Sorry, that didnt work. Try this:

Code:

if: t1 contains: t2
((t1 findString: t2) > 0) ifTrue: [^ true]
^ false

Code:

('%s contains %s' #b #if:contains:)

That better?

I get the "Nothing more expected" error just before the  ^ false

Sorry, put a period ( . ) just after the [^ true] like this: [^ true].


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#387 2010-05-19 09:14:57

Jakey22
Scratcher
Registered: 2008-12-28
Posts: 72

Re: Cool custom blocks in Scratch

Sperry wrote:

Jakey22 wrote:

Sperry wrote:


Sorry, that didnt work. Try this:

Code:

if: t1 contains: t2
((t1 findString: t2) > 0) ifTrue: [^ true]
^ false

Code:

('%s contains %s' #b #if:contains:)

That better?

I get the "Nothing more expected" error just before the  ^ false

Sorry, put a period ( . ) just after the [^ true] like this: [^ true].

IT WORKS!!!!!!!!!!!!! YES!!!!!!!!!


http://www.imagebookers.com/gallery/d/2561-1/ubuntu-wallpaper.png http://bullylug.org/linux-penguin.jpg
My website       PENGUINS!!!!!!!!!!!!!!!!!!!!! randomness.

Offline

 

#388 2010-05-19 11:15:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

nXIII wrote:

- key pressed wasn't my idea... I just implemented it in shadow_7283's thread about that block. I guess great minds think alike!  wink
- Wait, the one with or without the dialog? 'Cause I'm pretty sure that no one made the one without the dialog before me ... trust me, it's pretty hard.
- Er, that was actually billyedward's. That's why it says special thanks to billyedward in the help.
- Yes, but not ones with MENUS! (and I had that idea a REALLY long time ago, back when MathWizz and I had identical ideas at the same time...)
- Er, again I didn't see yours, just made this one by myself.

Lastly, for the people who actually hack Panther and care about it, (wow, that really trims down the numbers) I completely redid the arguments in the blockSpecs ... please don't tell me THAT was your idea.

ok, it's true that my blocks aren't as advanced as yours.
the camera block had the dialog.
and yes i started out with billy's but it only had the date so i added all the other ones.
and for the variable string inserters mine didnt have menus but it's not my point, i'm saying about the idea.
finally, you're right that you couldn't possibly have seen my constants because i didnt put them up on the forums.

Offline

 

#389 2010-05-19 11:34:05

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Cool custom blocks in Scratch

And to finish the arguement, nXIII and LS97 are both good Smalltalk programmers. You have good ideas. The end.

Last edited by markyparky56 (2010-05-19 14:11:07)


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#390 2010-05-19 13:36:37

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

markyparky56 wrote:

And to finish the arguement, nXIII and JS97 are both good Smalltalk programmers. You have good ideas. The end.

lol nice attempt at ending it but you spelt my name wrong. now i can start a new argument :p

Offline

 

#391 2010-05-19 14:10:54

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Cool custom blocks in Scratch

LS97 wrote:

markyparky56 wrote:

And to finish the arguement, nXIII and LS97 are both good Smalltalk programmers. You have good ideas. The end.

lol nice attempt at ending it but you spelt my name wrong. now i can start a new argument :p

NOOOOOOOOOOO!!!!!! Woops... le me change that...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#392 2010-05-19 14:18:56

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

markyparky56 wrote:

NOOOOOOOOOOO!!!!!! Woops... le me change that...

lol  smile

Offline

 

#393 2010-05-19 14:52:27

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Cool custom blocks in Scratch

what's the duplicate sprite code?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#394 2010-05-20 07:51:50

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Cool custom blocks in Scratch

comp500 wrote:

what's the duplicate sprite code?

Predefined.

All you have to do (unless you do it the nXIII way that no one understands but him) is type in the block spec

Code:

('clone' #- #duplicateNoAttach)

but if you are using the source code:

Code:

('clone'     -     duplicateNoAttach)

I think that works.

Last edited by henley (2010-05-20 07:52:24)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#395 2010-05-20 13:19:31

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Cool custom blocks in Scratch

henley wrote:

comp500 wrote:

what's the duplicate sprite code?

Predefined.

All you have to do (unless you do it the nXIII way that no one understands but him) is type in the block spec

Code:

('clone' #- #duplicateNoAttach)

but if you are using the source code:

Code:

('clone'     -     duplicateNoAttach)

I think that works.

Thanks. It works!


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#396 2010-05-20 14:15:42

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Cool custom blocks in Scratch

Joeman592 wrote:

pyrodon wrote:

Hi LS97. I'm not sure how to use the <sprite _ touching sprite> block that you made. Could you please tell me where to put all the code? I tried in many places and I still get errors.

Also, does anyone know the codes for the following and where to put them?

If touching sprite_, bounce
flip
(report name of sprite)
clone
delete me

Thanks in advance!

delete me is ('delete me' #- #deleteMe)

Code:

deleteMe
    self delete

p.s. made code myself!

report sprite name is ('sprite name #r #spriteName)

Code:

spriteName
    ^ self objName

Sprite name doesn't work.
It returns an error.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#397 2010-05-20 16:00:51

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Cool custom blocks in Scratch

comp500 wrote:

Code:

spriteName
    ^ self objName

Sprite name doesn't work.
It returns an error.

That's because it should be

Code:

spriteName
     ^objName

You just don't put the "self" in the code. And also the "^" would appear as an arrow pointing up, and that is what it should be.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#398 2010-05-20 16:20:40

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

are we sure it's not the missing dot after 'spriteName' ?

Offline

 

#399 2010-05-20 16:38:11

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Cool custom blocks in Scratch

LS97 wrote:

are we sure it's not the missing dot after 'spriteName' ?

Really? I hacked the Scratch we use at my school when the teacher was not looking (lol) and created that block with the code I showed comp500. And it worked.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#400 2010-05-21 02:51:36

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Cool custom blocks in Scratch

henley wrote:

comp500 wrote:

Code:

spriteName
    ^ self objName

Sprite name doesn't work.
It returns an error.

That's because it should be

Code:

spriteName
     ^objName

You just don't put the "self" in the code. And also the "^" would appear as an arrow pointing up, and that is what it should be.

It's actually with the spec. It returns an error when i type it in and press accept.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

Board footer