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

#276 2010-05-11 23:20:23

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

Re: Cool custom blocks in Scratch

also, whats the code for sprite name?

Last edited by Joeman592 (2010-05-11 23:20:38)


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

Offline

 

#277 2010-05-12 07:27:35

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Cool custom blocks in Scratch

Joeman592 wrote:

also, whats the code for sprite name?

Code:

name
^ self objName

Offline

 

#278 2010-05-12 08:35:29

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

Re: Cool custom blocks in Scratch

I need some code for a  <[] contains []> block.


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

Offline

 

#279 2010-05-12 08:51:05

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

Re: Cool custom blocks in Scratch

Jakey22 wrote:

I need some code for a  <[] contains []> block.

I think it is:

Code:

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

Does that work?


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

Offline

 

#280 2010-05-12 11:28:57

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

Re: Cool custom blocks in Scratch

LS97 wrote:

comp500 wrote:

Google chrome doesn't work with scratch  sad

hmm... try putting this into the block:
"whateverThePathForBrowserIs.exe" "http://whateverWebsite.com/"

it might work

Where shall i put it?


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

Offline

 

#281 2010-05-12 12:28:45

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

Re: Cool custom blocks in Scratch

comp500 wrote:

LS97 wrote:

comp500 wrote:

Google chrome doesn't work with scratch  sad

hmm... try putting this into the block:
"whateverThePathForBrowserIs.exe" "http://whateverWebsite.com/"

it might work

Where shall i put it?

oh. just in the normal scratch block!

Offline

 

#282 2010-05-12 12:33:09

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

Re: Cool custom blocks in Scratch

nXIII wrote:

waveOSBeta wrote:

Don't worry. I have a plan on how to hack panther. CLASSIFIED UNTIL RELEASE.

No, I'm going to add an error handler that doesn't use pluggableTextMorphs, so you can't use the 'doIt' trick, and we don't have Elements to help you, either!

you're really being selfish. you might just as well keep panther for yourself, if all you care about is being the first in everything and being famous. by sharing your source code you can help other understand stuff, and remember that if someone steals something from you it means it's good. why else would they steal it?

and i even curated one of your projects... (why did i do that?)

Offline

 

#283 2010-05-12 12:34:27

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

Re: Cool custom blocks in Scratch

100th post!
that's it. it's all im putting in my 100th post.
LS97
(i guess you knew that anyway).

Last edited by LS97 (2010-05-12 12:35:19)

Offline

 

#284 2010-05-12 13:55:14

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

Re: Cool custom blocks in Scratch

LS97 wrote:

comp500 wrote:

LS97 wrote:


hmm... try putting this into the block:
"whateverThePathForBrowserIs.exe" "http://whateverWebsite.com/"

it might work

Where shall i put it?

oh. just in the normal scratch block!

??Where?? In the spec?
(Edit its not installed, i had to reinstall scratch LOL)


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

Offline

 

#285 2010-05-12 14:29:22

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: Cool custom blocks in Scratch

But I could still use Preferences enableProgrammerFacilities and alt-click the project.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#286 2010-05-12 16:02:56

paulpsicle
Scratcher
Registered: 2008-10-12
Posts: 100+

Re: Cool custom blocks in Scratch

nXIII wrote:

There's an easier way to make the key pressed block: have it use a do: loop to go through all the keyNames.

Could you please give me the code for this?


http://blocks.scratchr.org/API.php?user=paulpsicle&amp;action=onlineStatus&amp;online=http://fishery.dyndns.org/paulpsicle.png&amp;offline=http://fishery.dyndns.org/paulpsicle_o.png

Offline

 

#287 2010-05-12 16:41:47

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

Re: Cool custom blocks in Scratch

Billybob-Mario wrote:

Joeman592 wrote:

also, whats the code for sprite name?

Code:

name
^ self objName

*Cough* *cough* *cough*

LS97 wrote:

nXIII wrote:

waveOSBeta wrote:

Don't worry. I have a plan on how to hack panther. CLASSIFIED UNTIL RELEASE.

No, I'm going to add an error handler that doesn't use pluggableTextMorphs, so you can't use the 'doIt' trick, and we don't have Elements to help you, either!

you're really being selfish. you might just as well keep panther for yourself, if all you care about is being the first in everything and being famous. by sharing your source code you can help other understand stuff, and remember that if someone steals something from you it means it's good. why else would they steal it?

and i even curated one of your projects... (why did i do that?)

Remarkably enough, it's not "selfish" to not want people stealing your ideas, not giving credit and then *points above a bit* giving them out as if they are theirs!

Um... I think you curated it because you thought it was a good project, that's usualy why you curate things.

Last edited by nXIII (2010-05-12 16:42:03)


nXIII

Offline

 

#288 2010-05-12 17:11:42

Catwalk923
Scratcher
Registered: 2010-01-30
Posts: 47

Re: Cool custom blocks in Scratch

LS97 wrote:

The http://www.freeimagehosting.net/uploads/db8cb97ba8.gifblock
Another request of SeptimusHeap.
Put this code in both Sprite and Stage Morph blockSpecs in the sensing category:

Code:

 ('%s mouse down?' #b #mousePressed: 'left')

then into the instance, into ScriptableScratchMorph, and into 'sensing ops'.
replace the 'mousePressed' code with the one below.

Code:

mousePressed: t1 
    t1 = 'left' ifTrue: [^ Sensor redButtonPressed].
    t1 = 'right' ifTrue: [^ Sensor yellowButtonPressed].
    t1 = 'middle' ifTrue: [^ Sensor blueButtonPressed].
    t1 = 'any' ifTrue: [^ Sensor anyButtonPressed].
    t1 = 'left ' ifTrue: [^ Sensor redButtonPressed].
    t1 = 'right ' ifTrue: [^ Sensor yellowButtonPressed].
    t1 = 'middle ' ifTrue: [^ Sensor blueButtonPressed].
    t1 = 'any ' ifTrue: [^ Sensor anyButtonPressed].
    ^ Sensor redButtonPressed

Then click accept and it should be fine. you'll find the new block in the sensing category. you can put left, right, middle or any into the box and it'll give you the respective sensor button boolean.

It didn't work! I tried, but when I clicked on it afterward it said "Error!" What am I doing wrong???


ılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılı

Offline

 

#289 2010-05-12 17:58:45

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Cool custom blocks in Scratch

nXIII wrote:

Billybob-Mario wrote:

Joeman592 wrote:

also, whats the code for sprite name?

Code:

name
^ self objName

*Cough* *cough* *cough*

I figured that out myself. Just because you made a block, doesn't mean that everyone stole it from you.

Offline

 

#290 2010-05-12 18:10:01

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

Re: Cool custom blocks in Scratch

Billybob-Mario wrote:

nXIII wrote:

Billybob-Mario wrote:


Code:

name
^ self objName

*Cough* *cough* *cough*

I figured that out myself. Just because you made a block, doesn't mean that everyone stole it from you.

very original, though  roll


nXIII

Offline

 

#291 2010-05-12 18:52:37

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

Re: Cool custom blocks in Scratch

Billybob-Mario wrote:

Joeman592 wrote:

also, whats the code for sprite name?

Code:

name
^ self objName

thx


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

Offline

 

#292 2010-05-12 19:03:23

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

Re: Cool custom blocks in Scratch

how about show/hide list blocks


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

Offline

 

#293 2010-05-12 20:07:13

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

Re: Cool custom blocks in Scratch

Joeman592 wrote:

how about show/hide list blocks

I already made those... there's a tutorial but I'm too lazy to find it  hmm


nXIII

Offline

 

#294 2010-05-12 23:03:30

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

Re: Cool custom blocks in Scratch

nXIII wrote:

Joeman592 wrote:

how about show/hide list blocks

I already made those... there's a tutorial but I'm too lazy to find it  hmm

could you please?  smile


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

Offline

 

#295 2010-05-13 04:54:10

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

Re: Cool custom blocks in Scratch

nXIII wrote:

Remarkably enough, it's not "selfish" to not want people stealing your ideas, not giving credit and then giving them out as if they are theirs!
Um... I think you curated it because you thought it was a good project, that's usualy why you curate things.

yea, you're right about the curate bit. but it's still selfish, because people LEARN from their mistakes and other people's success. if people don't give credit, although it's not nice of them it just means they're not worth noticing even. i'm trying in whatever diplomatical way to make you understand that sharing code is good for everyone.
jens, billyedward, me(later), the scratch team shared theirs, why shouldn't you share yours?

BTW, you made me spoil my 100 posts

Last edited by LS97 (2010-05-13 04:54:46)

Offline

 

#296 2010-05-13 10:12:44

Catwalk923
Scratcher
Registered: 2010-01-30
Posts: 47

Re: Cool custom blocks in Scratch

By the way, how do you save what you did so every time Scratch comes up, you have those blocks?


ılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılı

Offline

 

#297 2010-05-13 10:14:53

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

Re: Cool custom blocks in Scratch

Catwalk923 wrote:

By the way, how do you save what you did so every time Scratch comes up, you have those blocks?

shift-click the R in the logo and select 'save image for end-user'. but make a backup of the original Scratch IMAGE to be sure! (found in scratch directory, scratch.image)

Offline

 

#298 2010-05-13 10:23:09

Catwalk923
Scratcher
Registered: 2010-01-30
Posts: 47

Re: Cool custom blocks in Scratch

Oh, another question; how come it will not let me use a block like so: say [get [date]] Instead of saying the date, my sprite just says; Error!


ılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılı

Offline

 

#299 2010-05-13 10:24:16

Catwalk923
Scratcher
Registered: 2010-01-30
Posts: 47

Re: Cool custom blocks in Scratch

LS97 wrote:

Catwalk923 wrote:

By the way, how do you save what you did so every time Scratch comes up, you have those blocks?

shift-click the R in the logo and select 'save image for end-user'. but make a backup of the original Scratch IMAGE to be sure! (found in scratch directory, scratch.image)

Thanks!

Last edited by Catwalk923 (2010-05-13 10:26:26)


ılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılı

Offline

 

#300 2010-05-13 10:31:26

Catwalk923
Scratcher
Registered: 2010-01-30
Posts: 47

Re: Cool custom blocks in Scratch

Block requests: A (Date) block, a (time) block, and a (day) block. You know, where they look like the <mouse x> block? So all it does is report what is in it and you can put it in the say [] block successfully. Basically, I want to be able to have my sprites announcing the date, time, and day.  smile  Please make it!

Last edited by Catwalk923 (2010-05-13 10:32:23)


ılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılı

Offline

 

Board footer