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

#1076 2010-09-12 16:59:42

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

Re: Cool custom blocks in Scratch

Alright, I found the blockspec and code for the string reporter. Scriptable scratch morph.
blockspec:

Code:

('report %s' #r #report: 'hello')

code:

Code:

report: t1
^ t1

Last edited by zorket (2010-09-12 17:15:42)


Marzipan11 must learn to not spoil

Offline

 

#1077 2010-09-12 17:03:28

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Cool custom blocks in Scratch

Thats a block? it just reports exactly what you put in!


You can now reach me on Twitter @johnnydean1_

Offline

 

#1078 2010-09-12 17:16:11

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

Thats a block? it just reports exactly what you put in!

Yep! Pretty useless huh?


Marzipan11 must learn to not spoil

Offline

 

#1079 2010-09-13 13:51:47

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

Re: Cool custom blocks in Scratch

zorket wrote:

johnnydean1 wrote:

Thats a block? it just reports exactly what you put in!

Yep! Pretty useless huh?

and, in fact, if you want a string to fit inside a numeric reporter you could use the join block instead

Offline

 

#1080 2010-09-13 16:09:57

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

Re: Cool custom blocks in Scratch

LS97 wrote:

zorket wrote:

johnnydean1 wrote:

Thats a block? it just reports exactly what you put in!

Yep! Pretty useless huh?

and, in fact, if you want a string to fit inside a numeric reporter you could use the join block instead

Or maby you can use a variable.


Marzipan11 must learn to not spoil

Offline

 

#1081 2010-09-14 07:52:56

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

Re: Cool custom blocks in Scratch

J0nas1 wrote:

could you make a 3D floor effect block?
example:
without effect:
http://img202.imageshack.us/img202/1735 … effect.png
with effect:
http://img299.imageshack.us/img299/5428 … effect.png
with effect and rotated:
http://img801.imageshack.us/img801/3801 … othera.png

Actually there are only 3 defferent effects, and you'rs is not in the menu. Sorry.


Marzipan11 must learn to not spoil

Offline

 

#1082 2010-09-14 07:55:34

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

Re: Cool custom blocks in Scratch

LS97 wrote:

PlayWithFire wrote:

NOTE:
There's a second, more advanced version of the block, with a drop-down menu instead of a string inserter, but it involves extra coding. If you are willing to take the challenge, post and i'll edit this tutorial for you

big_smile   can i haz?

ok. note that this is for the source code. if you are using normal scratch replace the 'code' with 't1'
into Scratch-Blocks > CommandBlockMorph > all > uncoloredArgMorphFor:
add a line that looks like this:
$t = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeDates].
back in ScriptableScratchMorph, create a new method with this code:

timeDates
^ #('time' 'date' 'minutes' 'seconds' 'hours' 'weekday')

now replace the blockSpec you created with ('get %t' r getDate: 'time')
it should work  smile

Thanks!


Marzipan11 must learn to not spoil

Offline

 

#1083 2010-09-14 11:22:32

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

Re: Cool custom blocks in Scratch

I personally think this is the second block forum that should get ITopic'd. But that's just me.


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

Offline

 

#1084 2010-09-14 11:31:05

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Cool custom blocks in Scratch

bbbeb wrote:

I personally think this is the second block forum that should get ITopic'd. But that's just me.

I agree. Back it up here.


/* No comment */

Offline

 

#1085 2010-09-14 11:55:54

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Cool custom blocks in Scratch

I try to create a block but it won't let me save. If i don't save and then go to instance then it deletes what i have done.


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#1086 2010-09-14 13:27:54

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

Re: Cool custom blocks in Scratch

subzerostig wrote:

I try to create a block but it won't let me save. If i don't save and then go to instance then it deletes what i have done.

you mean it wont let you click accept?

Offline

 

#1087 2010-09-14 15:13:29

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

Re: Cool custom blocks in Scratch

You have to right click and hit "Accept."
Er, right click in the instance block.


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

Offline

 

#1088 2010-09-15 03:04:39

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Cool custom blocks in Scratch

I click accept and it says: "nothing more expected" but then when i try to go to instance or anything else it says: "Changes have not been saved is it OK to cancel changes" If I click yes then I go to instance but i lose my work, If i click No i stay where i am.


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#1089 2010-09-15 12:18:32

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

Re: Cool custom blocks in Scratch

subzerostig wrote:

I click accept and it says: "nothing more expected" but then when i try to go to instance or anything else it says: "Changes have not been saved is it OK to cancel changes" If I click yes then I go to instance but i lose my work, If i click No i stay where i am.

that means there's an error in your code. accepting works fine in itself.
try reviewing your code and fixing any syntax errors

Offline

 

#1090 2010-09-15 12:19:47

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Cool custom blocks in Scratch

Did you remember to put a dot at the end of the line? Or do you need to type 'self' before the command?


/* No comment */

Offline

 

#1091 2010-09-15 14:36:12

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

Re: Cool custom blocks in Scratch

Nothing more expected usually means you accidentally put a close bracket, parenthesis, etc. when you shouldn't have.


nXIII

Offline

 

#1092 2010-09-15 15:34:17

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Cool custom blocks in Scratch

Thanks for helping but it still won't work!!! This is what i type in: ('showing?' #b #getHidden). and it won't work. This is for the Showing? Block on the first page of the forums. I type this in on the bottom(apart from the : t1, self obsoleteblockspecs) on the: Scratch Objects-ScriptableScratchMorph-Class-BlockSpecs-BlockSpecs.


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#1093 2010-09-15 15:47:49

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

Re: Cool custom blocks in Scratch

You probably forgot a quote, aka '.

Offline

 

#1094 2010-09-15 16:02:44

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

Re: Cool custom blocks in Scratch

Maybe too many right parentheses?

Last edited by nXIII (2010-09-15 16:02:57)


nXIII

Offline

 

#1095 2010-09-15 17:45:48

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Cool custom blocks in Scratch

LS97 wrote:

ThePCKid wrote:

[removed]

i'll have said this for the 100000th time. my code is to get whether a sprite is SHOWING, not hiding. i know that's easier but it is more complicated for the user. you only make the squeak code once, but you use the block many more times.

I messed up again. Shoot.

Offline

 

#1096 2010-09-15 19:12:10

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

Re: Cool custom blocks in Scratch

subzerostig wrote:

Thanks for helping but it still won't work!!! This is what i type in: ('showing?' #b #getHidden). and it won't work. This is for the Showing? Block on the first page of the forums. I type this in on the bottom(apart from the : t1, self obsoleteblockspecs) on the: Scratch Objects-ScriptableScratchMorph-Class-BlockSpecs-BlockSpecs.

The period isnt neccesary.  tongue


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

Offline

 

#1097 2010-09-16 11:56:56

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

Re: Cool custom blocks in Scratch

bbbeb wrote:

subzerostig wrote:

Thanks for helping but it still won't work!!! This is what i type in: ('showing?' #b #getHidden). and it won't work. This is for the Showing? Block on the first page of the forums. I type this in on the bottom(apart from the : t1, self obsoleteblockspecs) on the: Scratch Objects-ScriptableScratchMorph-Class-BlockSpecs-BlockSpecs.

The period isnt neccesary.  tongue

ah, finally someone spotted the mistake. i wonder why nXIII didn't spot it though  neutral

Offline

 

#1098 2010-09-16 14:43:09

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

Re: Cool custom blocks in Scratch

LS97 wrote:

bbbeb wrote:

subzerostig wrote:

Thanks for helping but it still won't work!!! This is what i type in: ('showing?' #b #getHidden). and it won't work. This is for the Showing? Block on the first page of the forums. I type this in on the bottom(apart from the : t1, self obsoleteblockspecs) on the: Scratch Objects-ScriptableScratchMorph-Class-BlockSpecs-BlockSpecs.

The period isnt neccesary.  tongue

ah, finally someone spotted the mistake. i wonder why nXIII didn't spot it though  neutral

I considered it to be a full stop in the sentence with incorrect capitalization.


nXIII

Offline

 

#1099 2010-09-16 15:00:59

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

Re: Cool custom blocks in Scratch

nXIII wrote:

LS97 wrote:

bbbeb wrote:


The period isnt neccesary.  tongue

ah, finally someone spotted the mistake. i wonder why nXIII didn't spot it though  neutral

I considered it to be a full stop in the sentence with incorrect capitalization.

HAHAHA  lol  LOL
you really seem *¨*¨* sometimes...

Offline

 

#1100 2010-09-16 15:08:29

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

Re: Cool custom blocks in Scratch

LS97 wrote:

you really seem *¨*¨* sometimes...

Um....?


nXIII

Offline

 

Board footer