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

#1126 2010-09-26 15:20:27

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

Re: Cool custom blocks in Scratch

Here are some blocks that could use some coding: (layer) (number of pen marks) ([color effect] of [sprite1]) [delete this script] [turn around] [Play movie clip from page {} from x: {} y: {} to x: {} y: {}] [error script]


Marzipan11 must learn to not spoil

Offline

 

#1127 2010-09-27 13:25:02

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

Re: Cool custom blocks in Scratch

zorket wrote:

Here are some blocks that could use some coding:
(layer) Bingo has it, although it only works in 1.3.0 TBR soon
(number of pen marks) Some mod has it, i've tried to find unsuccessfully
([color effect] of [sprite1]) is definitely possible, but takes up space in menu
[delete this script] what's its use?
[turn around] do you men mirror or just change heading by 180?
[Play movie clip from page {} from x: {} y: {} to x: {} y: {}] nah...
[error script]wow - how useful - you can make your own better personalized too.

Offline

 

#1128 2010-09-27 16:16:23

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

Re: Cool custom blocks in Scratch

LS97 wrote:

zorket wrote:

Here are some blocks that could use some coding:
(layer) Bingo has it, although it only works in 1.3.0 TBR soon
(number of pen marks) Some mod has it, i've tried to find unsuccessfully The new claw has it
([color effect] of [sprite1]) is definitely possible, but takes up space in menu
[delete this script] what's its use?
[turn around] do you men mirror or just change heading by 180?
[Play movie clip from page {} from x: {} y: {} to x: {} y: {}] nah...
[error script]wow - how useful - you can make your own better personalized too.


You can now reach me on Twitter @johnnydean1_

Offline

 

#1129 2010-09-27 20:01:03

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

Re: Cool custom blocks in Scratch

LS97 wrote:

zorket wrote:

Here are some blocks that could use some coding:
(layer) Bingo has it, although it only works in 1.3.0 TBR soon
(number of pen marks) Some mod has it, i've tried to find unsuccessfully
([color effect] of [sprite1]) is definitely possible, but takes up space in menu
[delete this script] what's its use?
[turn around] do you men mirror or just change heading by 180?
[Play movie clip from page {} from x: {} y: {} to x: {} y: {}] nah...
[error script]wow - how useful - you can make your own better personalized too.

You HATE my ideas? How EVIL!


Marzipan11 must learn to not spoil

Offline

 

#1130 2010-09-27 21:58:21

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

Re: Cool custom blocks in Scratch

oh my god.

i swear, no one will make a <talking?> block!  tongue


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

Offline

 

#1131 2010-09-28 08:32:07

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

Re: Cool custom blocks in Scratch

bbbeb wrote:

oh my god.

i swear, no one will make a <talking?> block!  tongue

Yes, but you didn't guarentte.
I'm going back to the block library.
FOREVER.


Marzipan11 must learn to not spoil

Offline

 

#1132 2010-09-28 12:05:56

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

Re: Cool custom blocks in Scratch

zorket wrote:

LS97 wrote:

zorket wrote:

Here are some blocks that could use some coding:
(layer) Bingo has it, although it only works in 1.3.0 TBR soon
(number of pen marks) Some mod has it, i've tried to find unsuccessfully
([color effect] of [sprite1]) is definitely possible, but takes up space in menu
[delete this script] what's its use?
[turn around] do you men mirror or just change heading by 180?
[Play movie clip from page {} from x: {} y: {} to x: {} y: {}] nah...
[error script]wow - how useful - you can make your own better personalized too.

You HATE my ideas? How EVIL!

no, i don't hate them. i just don't think they're all useful. i might be wrong, so feel free to argue against this  big_smile

Offline

 

#1133 2010-09-28 16:51:53

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

Re: Cool custom blocks in Scratch

LS97 wrote:

zorket wrote:

LS97 wrote:

You HATE my ideas? How EVIL!

no, i don't hate them. i just don't think they're all useful. i might be wrong, so feel free to argue against this  big_smile

. I guess you 42% like my ideas, but i'm not
sharing my blocks anymore here.

Last edited by zorket (2010-09-28 16:52:08)


Marzipan11 must learn to not spoil

Offline

 

#1134 2010-09-29 12:22:52

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

Re: Cool custom blocks in Scratch

zorket wrote:

Here are some blocks that could use some coding: ([color effect] of [sprite1])

ScratchSpriteMorph and ScratchStageMorph:
        attributeNames: add what you want.
        getAttribute: it's obvious what needs doing.


/* No comment */

Offline

 

#1135 2010-09-30 01:32:24

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

could someone make a exit presentation mode one

and a clone block that works in pres mode

and also a Broadcast [] to sprite []

THANKS

Offline

 

#1136 2010-09-30 11:26:36

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

Re: Cool custom blocks in Scratch

me450 wrote:

could someone make a exit presentation mode one

and a clone block that works in pres mode

and also a Broadcast [] to sprite []

THANKS

i can make the first one -- ScratchFrameMorph new exitPresentatonMode
it probably won't work anyway

Offline

 

#1137 2010-09-30 11:30:11

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

Re: Cool custom blocks in Scratch

How can I make all blocks work in pres. mode


You can now reach me on Twitter @johnnydean1_

Offline

 

#1138 2010-09-30 11:30:36

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

Re: Cool custom blocks in Scratch

Which ones don't?


/* No comment */

Offline

 

#1139 2010-09-30 11:31:37

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

Re: Cool custom blocks in Scratch

TheSuccessor wrote:

Which ones don't?

Well.. clone blocks
exit presentation mode


You can now reach me on Twitter @johnnydean1_

Offline

 

#1140 2010-09-30 11:42:36

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

Re: Cool custom blocks in Scratch

Oh and I have made a block, but when I check the reporter its says 'Sprite 1 ...'
How do I remove the Sprite 1 bit?


You can now reach me on Twitter @johnnydean1_

Offline

 

#1141 2010-09-30 14:41:45

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

Oh and I have made a block, but when I check the reporter its says 'Sprite 1 ...'
How do I remove the Sprite 1 bit?

modify the #isSpriteSpecific: method


nXIII

Offline

 

#1142 2010-09-30 15:49:59

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

Re: Cool custom blocks in Scratch

Isnt it
isSpriteSpecificTarget: t1 selector: t2

Last edited by johnnydean1 (2010-09-30 15:51:29)


You can now reach me on Twitter @johnnydean1_

Offline

 

#1143 2010-09-30 16:09:23

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

Isnt it
isSpriteSpecificTarget: t1 selector: t2

oh, yea, sure.  big_smile


nXIII

Offline

 

#1144 2010-09-30 16:10:28

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

Re: Cool custom blocks in Scratch

kk


You can now reach me on Twitter @johnnydean1_

Offline

 

#1145 2010-10-01 05:16:17

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

LS97 wrote:

The 'Get time/date' block
http://www.freeimagehosting.net/uploads/209a5b329a.gif
Here we go!
The get time/date block reports the time, date, hour, etc. without the user having to insert it manually.

Copy this line of code into a space between two blocks in the 'control' section of blockSpecs in ScriptableScratchMorph.

Code:

 ('get %s' #r #getTime: 'date')

Then go to the instance section, then to 'other ops' and replace the code of broadcast: with the following

Code:

getTime: t1 
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'day' ifTrue: [^ Date today weekday].
    t1 = 'help' ifTrue: [^ 'type date, short date, time, seconds, minutes, day, hours'].
    ^ 'Error!'

then right-click and click accept. type your initials and you're ready to use the new block!

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

im fine with extra advanced tutorial as it would produce less errors

please post

Thanks  smile  (:

Offline

 

#1146 2010-10-01 07:42:39

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

Re: Cool custom blocks in Scratch

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

im fine with extra advanced tutorial as it would produce less errors

please post

Thanks  smile  (:

I've copied his way exactly. here it is:

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' 'short date' 'seconds' 'minutes' 'seconds' 'hours' 'weekday')

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

Replace the code with:

Code:

getTime: t1 
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'weekday' ifTrue: [^ Date today weekday].
^ Error!

___________________________________________
I've edited the tutorial a little. LYSD didn't post the tutorial correctly.

Last edited by zorket (2010-10-01 07:43:32)


Marzipan11 must learn to not spoil

Offline

 

#1147 2010-10-01 17:47:04

pen13
Scratcher
Registered: 2010-08-27
Posts: 100+

Re: Cool custom blocks in Scratch

a log off  block


http://womrealms.com/char.php?nomimg1:3ri855a
pen13 http://blocks.scratchr.org/API.php?user=pen13&amp;action=onlineStatus green= online gray=offline

Offline

 

#1148 2010-10-01 20:14:13

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

Re: Cool custom blocks in Scratch

pen13 wrote:

a log off  block

log off what


Marzipan11 must learn to not spoil

Offline

 

#1149 2010-10-02 04:21:53

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

zorket 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

im fine with extra advanced tutorial as it would produce less errors

please post

Thanks  smile  (:

I've copied his way exactly. here it is:

ok. note that this is for the source code. if you are using normal scratch replace the 'code' with 't2'
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' 'short date' 'seconds' 'minutes' 'seconds' 'hours' 'weekday')

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

Replace the code with:

Code:

getTime: t1 
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'weekday' ifTrue: [^ Date today weekday].
^ 'Error!'

___________________________________________
I've edited the tutorial a little. LYSD didn't post the tutorial correctly.

thanks

ive edited it a bit to make it work on normal scratch

and also it says error when i use the block

thanks

Last edited by me450 (2010-10-02 04:27:13)

Offline

 

#1150 2010-10-02 05:02:05

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

i was looking through panther blocks and was trying to get the file ones onto scratch

but they dont work so could someone plz help

ive converted the $String$ to %s and the number one 2

they say error though

thnaks

Offline

 

Board footer