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

#1 2011-10-13 18:44:13

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Invertion block

invertion block goes like this:

(( 1 <invert> 100 ))

if the input number is 1, the output number is 100
if the input number is 2, the output number is 99
and so on
(( 2 <invert> 100 ))

if the input number is 1, the output number is 101
if the input number is 2, the output number is 100
if the input number is 3, the output number is 99
and so on

Its hard to explane  tongue


http://blocks.scratchr.org/API.php?user=KrIsMa&amp;action=onlineStatus&amp;online=http://i49.tinypic.com/2pzic0m.png&amp;offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#2 2011-10-13 19:24:07

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Invertion block

This is possible. I'll teach you how.

There are going to be 3 variables: min of inversion, max of inversion, and input.

Let's pretend the variables are 1, 10, and 2. The answer would be 9, right?

To get 9, subtract the min from the input. 2-1=1.

Subtract the result from the max. 10-1=9. There's your answer. Now make it work in Scratch!

Offline

 

#3 2011-10-13 19:30:25

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Invertion block

kayybee wrote:

This is possible. I'll teach you how.

There are going to be 3 variables: min of inversion, max of inversion, and input.

Let's pretend the variables are 1, 10, and 2. The answer would be 9, right?

To get 9, subtract the min from the input. 2-1=1.

Subtract the result from the max. 10-1=9. There's your answer. Now make it work in Scratch!

OMG that helped a lot. Thanks!


http://blocks.scratchr.org/API.php?user=KrIsMa&amp;action=onlineStatus&amp;online=http://i49.tinypic.com/2pzic0m.png&amp;offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#4 2011-10-13 19:31:07

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Invertion block

You're welcome!

Offline

 

Board footer