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

#1 2010-05-11 08:26:08

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

How to make the Factorial, Absolute Value, and Reversed blocks

Step 1. Shift + right click in the loop in the R in the Scratch logo.

Step 2. Select 'turn fill screen off'

Step 3. Click on the white space that appeared.

Step 4. Select open, then browser.

Step 5. On the leftmost pane in the green window, select Scratch - Objects.

Step 6. On the next pane, select ScriptableScratchMorph.

Step 7. Below the second pane, click on 'class'.

Step 8. In the next pane, select 'block specs'

Step 9. In the rightmost pane, select 'blockSpecs'.

Step 10. Read in the bottom pane until you find this:

Code:

'operators' ('%n + %n' #r #+ #- #-)

Step 11. Keep reading until you see this:

Code:

('round %n' #r #rounded #-)

Step 12. Paste this code with Alt + V directly after.

Code:

 ('%n !' #r #factorial: #-)

TIP: The ' 's mean what the viewer will see, the %n creates a number input. The #r means the block is a round reporter, the #factorial: is the message, kinda like a broadcast, that we will program next. The #- means the block will be blank. Replace the - with any number, and that will be the default.

Step 13. Right click on the text, and hit 'save'.

Step 14. Now, click on 'instance' below the second pane.

Step 15. Select 'other ops' in the next pane.

Step 16. In the bottom pane, delete the text, and copy and paste this with Alt + V.

Code:

factorial: t1 
    ^ t1 factorial

Step 17. Right click on the text, and hit save. Close out of the browser.

Step 18. Shift + right click on the loop in the R, and select save image for end user.

Step 19.  Hit 'Yes', and re-open Scratch.

Step 20. You have your new block! (Note: This block doesn't work online!)



I will post the rest when I get home  smile


Note: Does anyone know how to get the checkbox off of the side of the block?


http://i46.tinypic.com/dw7zft.png

Offline

 

#2 2010-05-11 16:07:59

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

SeptimusHeap wrote:

Note: Does anyone know how to get the checkbox off of the side of the block?

Yay! Someone Asks! (I've Been Waiting FOREVER To Find This Out!  big_smile  )

Offline

 

#3 2010-05-11 16:12:48

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

How do you?


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

Offline

 

#4 2010-05-11 16:31:08

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: How to make the Factorial, Absolute Value, and Reversed blocks

The reversed block:

Step 1. Follow the steps from my other tutorial until you open blockspecs.

Step 2. Find this code.

Code:

('length of %s' #r #stringLength: 'world')

Step 3. Now paste this code after with ALT + V.

Code:

('%s reversed' #r #reversed: 'world')

TIP: The %s creates a string inserter, where you can insert text or a variable. The 'world' shows the default value for the blank. Choose one to your liking, like 'I like pie'!

Step 4. Follow the steps from my other tutorial to open 'other ops'.

Step 5. In the bottom panel, paste this code with ALT + V.

Code:

reversed: t1 
    ^ t1 reversed

Step 6. Follow my other tutorial to save changes.

Step 7. Enjoy!

Last edited by SeptimusHeap (2010-05-11 16:31:49)


http://i46.tinypic.com/dw7zft.png

Offline

 

#5 2010-05-11 17:15:45

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

I Think Your Home. XD

Offline

 

#6 2010-05-11 17:55:28

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

SeptimusHeap wrote:

Note: Does anyone know how to get the checkbox off of the side of the block?

M3! (sorry, my 1337 kicked in there...)


nXIII

Offline

 

#7 2010-05-11 19:04:58

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

^
How?


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

Offline

 

#8 2010-05-11 19:34:34

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

Re: How to make the Factorial, Absolute Value, and Reversed blocks

waveOSBeta wrote:

^
How?

Your block just has to be that awesome! xD (JK not really....)


nXIII

Offline

 

Board footer