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

#51 2012-06-04 17:46:42

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

Wait, if i downloaded the Windows version, and put the files in the Source Code, would it work?


Get ready for domination of:  tongue

Offline

 

#52 2012-06-04 17:49:51

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

coolhogs wrote:

Wait, if i downloaded the Windows version, and put the files in the Source Code, would it work?

I think so...


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#53 2012-06-04 17:51:38

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

No, it's not working.

Last edited by coolhogs (2012-06-04 17:51:58)


Get ready for domination of:  tongue

Offline

 

#54 2012-06-04 17:56:42

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

It says a really long message when I click it. A really long one...


Get ready for domination of:  tongue

Offline

 

#55 2012-06-04 18:05:43

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

It's a really long one. It must take at least half an hour to scroll down it.

Last edited by coolhogs (2012-06-04 18:06:45)


Get ready for domination of:  tongue

Offline

 

#56 2012-06-04 18:20:50

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

Can someone please tell me a good Smalltalk tutorial? I need to learn how to do methods.


Get ready for domination of:  tongue

Offline

 

#57 2012-06-04 18:21:17

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

coolhogs wrote:

Can someone please tell me a good Smalltalk tutorial? I need to learn how to do methods.

They are all over this site and forums, as well as on the Wiki.


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#58 2012-06-04 18:48:28

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

I went to Scratch-Objects>ScratchSpriteMorph>class>blockspecs>blockSpecs, and there's only motion, looks, pen, and sensing on it. Where's the other category's block specs at?


Get ready for domination of:  tongue

Offline

 

#59 2012-06-04 18:50:32

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

coolhogs wrote:

I went to Scratch-Objects>ScratchSpriteMorph>class>blockspecs>blockSpecs, and there's only motion, looks, pen, and sensing on it. Where's the other category's block specs at?

There's also ScriptableScratchMorph and ScratchStageMorph


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#60 2012-06-04 18:52:23

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

Well, Scriptable Scratch Morph just links me to a block tutorial. Oh, there's where it is.

Last edited by coolhogs (2012-06-04 18:54:08)


Get ready for domination of:  tongue

Offline

 

#61 2012-06-04 18:53:56

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

coolhogs wrote:

Well, Scriptable Scratch Morph just links me to a block tutorial.

I don't think that the Squeak browser links to a tutorial...


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#62 2012-06-04 18:56:22

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

It's just sensing, pen, and looks in the ScratchStageMorph.


Get ready for domination of:  tongue

Offline

 

#63 2012-06-04 19:00:10

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

coolhogs wrote:

It's just sensing, pen, and looks in the ScratchStageMorph.

ScriptableScratchMorph has most of the stuff that can be used by either stage or sprites.

Btw, I have something you may want to see: http://scratch.mit.edu/forums/viewtopic … 2#p1265322 [/offtopic]...


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#64 2012-06-04 19:01:35

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Mod Question

ScriptableScratchMorph - A class for blocks that appear on both sprites and the stage
ScratchSpriteMorph - A class for blocks that appear only on Sprites
ScratchStageMorph - A class for blocks that appear only on the Stage

Last edited by chanmanpartyman (2012-06-04 19:02:29)

Offline

 

#65 2012-06-04 19:02:41

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

chanmanpartyman wrote:

ScriptableScratchMorph - A class for blocks that appear on both sprites and the stage
ScratchSpriteMorph - A class for blocks that appear only on Sprites
ScratchStageMorph - A class for blocks that appear only on the Stage

Thanks for clarifying. That's what I was trying to say.


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#66 2012-06-04 19:03:34

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Mod Question

Any time  tongue
@Coolhogs http://wiki.squeak.org/squeak/792 & http://stephane.ducasse.free.fr/FreeBooks.html

Last edited by chanmanpartyman (2012-06-04 19:05:01)

Offline

 

#67 2012-06-04 19:05:04

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

It says this:blockSpecs
    "Answer a collection of block specifications for the blocks that are common to all objects. Block specificatons (Arrays) are interspersed with category names (Strings). A block specification is an Array of the form: (<block spec string> <block type> <selector> [optional initial argument values]).

    Explanation of flags:
        -    no flags
        b    boolean reporter
        c    c-shaped block containing a sequence of commands (always special form)
        r    reporter
        s    special form command with its own evaluation rule
        t    timed command, like wait or glide
        E    message event hat
        K    key event hat
        M    mouse-click event hat
        S    start event hat
        W    when <condition> hat (obsolete)"

    | blocks |
    blocks _ #(
        'control'
            ('when %m clicked'                S    -)
            ('when %k key pressed'            K    -)
            ('when %m clicked'                M    -)
            -
            ('wait %n secs'                    t    wait:elapsed:from: 1)
            -
            ('forever'                        c    doForever)
            ('repeat %n'                        c    doRepeat 10)
            -
            ('broadcast %e'                    -    broadcast:)
            ('broadcast %e and wait'            s    doBroadcastAndWait)
            ('when I receive %e'            E    -)
            -
            ('forever if %b'                    c    doForeverIf)
            ('if %b'                            c    doIf)
            ('if %b'                            c    doIfElse)
            ('wait until %b'                    s    doWaitUntil)
            ('repeat until %b'                c    doUntil)
            -
            ('stop script'                    s    doReturn)
            ('stop all'                        -    stopAll)
        'operators'
            ('%n + %n'                        r    + - -)
            ('%n - %n'                        r    - - -)
            ('%n * %n'                        r    * - -)
            ('%n / %n'                        r    / - -)
            -
            ('pick random %n to %n'        r    randomFrom:to: 1 10)
            -
            ('%s < %s'                        b    < '' '')
            ('%s = %s'                        b    = '' '')
            ('%s > %s'                        b    > '' '')
            -
            ('%b and %b'                    b    &)
            ('%b or %b'                        b    |)
            ('not %b'                        b    not)
            -
            ('join %s %s'                    r    concatenate:with: 'hello ' 'world')
            ('letter %n of %s'                r    letter:of: 1 'world')
            ('length of %s'                    r    stringLength: 'world')
            -
            ('%n mod %n'                    r    \\ - -)
            ('round %n'                        r    rounded -)
            -
            ('%f of %n'                        r    computeFunction:of: 'sqrt' 10)
        'sound'
            ('play sound %S'                -    playSound:)
            ('play sound %S until done'        s    doPlaySoundAndWait)
            ('stop all sounds'                -    stopAllSounds)
            -
            ('play drum %D for %n beats'    t     drum:duration:elapsed:from: 48 0.2)
            ('rest for %n beats'                t     rest:elapsed:from: 0.2)
            -
            ('play note %N for %n beats'    t    noteOn:duration:elapsed:from: 60 0.5)
            ('set instrument to %I'            -     midiInstrument: 1)
            -
            ('change volume by %n'        -     changeVolumeBy: -10)
            ('set volume to %n%'            -     setVolumeTo: 100)
            ('volume'                        r     volume)
            -
            ('change tempo by %n'            -     changeTempoBy: 20)
            ('set tempo to %n bpm'            -     setTempoTo: 60)
            ('tempo'                            r     tempo)
        'motor'
            ('motor on for %n secs'            t    motorOnFor:elapsed:from: 1)
            ('motor on'                        -    allMotorsOn)
            ('motor off'                        -    allMotorsOff)
            ('motor power %n'                -    startMotorPower: 100)
            ('motor direction %W'            -    setMotorDirection: 'this way')
        'variables'
            ('show variable %v'                -    showVariable:)
            ('hide variable %v'                -    hideVariable:)
        'list'
            ('add %s to %L'                    -    append:toList: 'thing')
            -
            ('delete %y of %L'                -    deleteLine:ofList: 1)
            ('insert %s at %i of %L'            -    insert:at:ofList: 'thing' 1)
            ('replace item %i of %L with %s'        -    setLine:ofList:to: 1 'list' 'thing')
            -
            ('item %i of %L'                    r    getLine:ofList: 1)
            ('length of %L'                    r    lineCountOfList:)
            ('%L contains %s'                b    list:contains: 'list' 'thing')
    ).

    ^ blocks, self obsoleteBlockSpecs


Get ready for domination of:  tongue

Offline

 

#68 2012-06-04 19:06:10

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

Yes, that is what you want. That's not a tutorial, that thing at the top is just a comment.


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#69 2012-06-04 19:08:46

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

OK, what blocks should I do first? Also, can you create a new category in this?

Last edited by coolhogs (2012-06-04 19:10:09)


Get ready for domination of:  tongue

Offline

 

#70 2012-06-04 19:10:22

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

Whatever ones you want!


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#71 2012-06-04 19:20:09

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

Ok, I have my first block. It's not working!


Get ready for domination of:  tongue

Offline

 

#72 2012-06-04 19:22:00

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Mod Question

Did you code it correctly and are you calling it correctly?

Offline

 

#73 2012-06-04 19:23:01

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Mod Question

Wait, I didn't do the method. It's create variable []. I don't know how to do the method.

Last edited by coolhogs (2012-06-04 19:23:51)


Get ready for domination of:  tongue

Offline

 

#74 2012-06-04 19:24:07

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Mod Question

chanmanpartyman wrote:

Did you code it correctly and are you calling it correctly?

Yeah. Could you put the code here for us?

Edit: Aww, I hit the button too late!  tongue

Last edited by jvvg (2012-06-04 19:24:36)


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#75 2012-06-04 19:24:23

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Mod Question

coolhogs wrote:

Wait, I didn't do the method. It's create variable []

That method is already built in, how do you think the Make a variable button works?  tongue  Go in variables under ScriptableScratchMorph and find the method "createGlobalVariable"

Offline

 

Board footer