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

#1 2010-05-10 21:31:11

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

How to make the (() ^ ()) block

I'm going to use the Scratch 1.4 source code this time
___________________________________________________________________________________
1. Start the ScratchSourceCode1.4 image.
2. In the system browser, click "class" and goto "Scratch-Objects -> ScriptableScratchMorph -> block specs -> blockSpecs".
3. Under ('%n / %n'                     r    / - -) type in the following code:

Code:

            ('%n ^ %n'                     r    raise:toThePowerOf: - -)

4. Alt-Click on the text and click accept.
5. If asked, type in your initials.
6. Squeak might complain that raise:toThePowerOf: doesn't exist. Just click raise:toThePowerOf:.
7. Click on "instance" and goto "Scratch-Objects -> ScriptableScratchMorph".
8. Hover over the third pane and click the dash that appears.
9. Click "new category".
10. Click "new..."
11. Type in "operator ops" and click accept.
12. Replace the template there with this code:

Code:

raise: t1 toThePowerOf: 12
    "Raises t1 to the power of t2."
    
    ^ t1 raisedTo: t2

13. Alt-click on the text and click accept.
14. If asked, type in your initials.
15. Try out the new block!
16. If you like it, click on the gray area and click save.

Offline

 

#2 2010-05-11 08:25:33

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: How to make the (() ^ ()) block

Sorry ThePCKid, But Alot Of People Already Know That.  tongue

Offline

 

#3 2010-05-11 18:02:05

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

Re: How to make the (() ^ ()) block

TheGameMaster1231 wrote:

Sorry ThePCKid, But Alot Of People Already Know That.  tongue

I'm sorry. I'm just trying to challenge myself to make blocks without looking at tutorials.

Offline

 

#4 2010-05-11 18:48:53

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: How to make the (() ^ ()) block

ThePCKid wrote:

TheGameMaster1231 wrote:

Sorry ThePCKid, But Alot Of People Already Know That.  tongue

I'm sorry. I'm just trying to challenge myself to make blocks without looking at tutorials.

Oh, Ok. Carry On. While Your Doing That, I Think I'll Just Do A Barrel Roll. *Falls Off Chair Doing A Barrel Roll*

EDIT: Ok, For Some Odd Reason, I Seriously Did A Barrel Roll And Fell Off My Chair. XD

Last edited by TheGameMaster1231 (2010-05-11 18:51:28)

Offline

 

#5 2010-05-11 18:54:52

rocket101
Scratcher
Registered: 2009-08-21
Posts: 500+

Re: How to make the (() ^ ()) block

Cool tutorial!

Offline

 

#6 2010-05-11 18:58:09

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

Re: How to make the (() ^ ()) block

TheGameMaster1231 wrote:

ThePCKid wrote:

TheGameMaster1231 wrote:

Sorry ThePCKid, But Alot Of People Already Know That.  tongue

I'm sorry. I'm just trying to challenge myself to make blocks without looking at tutorials.

Oh, Ok. Carry On. While Your Doing That, I Think I'll Just Do A Barrel Roll. *Falls Off Chair Doing A Barrel Roll*

EDIT: Ok, For Some Odd Reason, I Seriously Did A Barrel Roll And Fell Off My Chair. XD

LOL

rocket101 wrote:

Cool tutorial!

Thanks!

Offline

 

#7 2010-05-11 21:56:26

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: How to make the (() ^ ()) block

I can't get 'new category'  sad


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#8 2010-05-12 17:54:09

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

Re: How to make the (() ^ ()) block

midnightleopard wrote:

I can't get 'new category'  sad

Can you get the menu?

Offline

 

Board footer