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

#1 2010-04-25 20:29:20

killubear
Scratcher
Registered: 2009-07-14
Posts: 7

A new Function Block option

add an inverse function to the function block

what this would do is find the inverse of a number!
this means that a negative becomes a positive while a positive becomes a negetive!
here is a project that explains and shows this!

http://scratch.mit.edu/projects/killubear/1008554

please leave comment on what you think  smile

Offline

 

#2 2010-04-25 20:41:54

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: A new Function Block option

killubear wrote:

add an inverse function to the function block

what this would do is find the inverse of a number!
this means that a negative becomes a positive while a positive becomes a negetive!
here is a project that explains and shows this!

http://scratch.mit.edu/projects/killubear/1008554

please leave comment on what you think  smile

Not a bad idea  wink , but it's already fairly simple to do. You can just do one of the following:


  (( 0 <-> number ))

Or,

  (( -1  <*> number ))

I hope you understand, and hopefully that helps with whatever you need that block for.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#3 2010-04-26 08:53:02

Seefat
Scratcher
Registered: 2009-11-19
Posts: 18

Re: A new Function Block option

If you are creating a scrolling and shooting game than you must inverse. It means:
set scrollx to
0-(mouse x*2)
set scrolly to
0-(mouse y*2)
so if the mouse x is 2 for example, it is turned 4 and scrolled. If you dont inverse, its a total disaster. Dont believe me, try once inverse. And once normal.

Offline

 

#4 2010-04-26 16:40:18

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: A new Function Block option

But why do you want a new block for something that can be accomplished with one already existing block?


Check out my projects if you have a chance.

Offline

 

#5 2010-05-08 11:41:08

raghsthebest
Scratcher
Registered: 2009-08-31
Posts: 5

Re: A new Function Block option

if you just want the inverse of a negative number, you could use the absolute value block

Offline

 

#6 2010-06-14 13:45:49

TheExternal
Scratcher
Registered: 2008-11-04
Posts: 54

Re: A new Function Block option

raghsthebest wrote:

if you just want the inverse of a negative number, you could use the absolute value block

i agee but if you just have to make the block I came up with this:

http://scratchx.webs.com/apps/photos/photo?photoid=86480635


http://i37.tinypic.com/2jdp99s.png
The funniest thing about this quote is that by the time you realize it doesn't say anything of importance, it's too late to stop reading it.

Offline

 

#7 2010-06-14 18:18:01

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: A new Function Block option

Even though you can multiply by -1, I think it is still a good idea to implement.


http://i42.tinypic.com/2rot8c2.png

Offline

 

#8 2010-06-14 18:52:19

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: A new Function Block option

I agree with Coka; although it's possible to do already, it's a good idea to implement because a lot of users don't know what to do.

Offline

 

#9 2010-06-14 21:44:08

JTxt
Scratcher
Registered: 2010-05-19
Posts: 100+

Re: A new Function Block option

And I see sense in having this as a block. 
BUT not as an official block.  I think we can easily add too many blocks to the default block set.

Instead, allow users to create and add useful blocks like this to the website.
Then allow the community to vote on them. Popular, good ideas like this, will rise to the top and can be easily found, and added into projects.

Last edited by JTxt (2010-06-14 21:46:31)


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

#10 2010-06-15 10:53:11

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A new Function Block option

I say no, because scratch is to teach programming languages and something this simple can be learned. Better now than when you move on to another language.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer