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

#1 2011-12-14 14:27:10

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Touching Edge?

I was just thinking about this. It would be similar to 'if on edge, bounce', but there would be no bounce. It would just return true/false.  wink

Offline

 

#2 2011-12-14 16:34:23

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Touching Edge?

um... doesn't this already exist?


http://i.imgur.com/1QqnHxQ.png

Offline

 

#3 2011-12-14 16:37:41

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

TRocket wrote:

um... doesn't this already exist?

Yes it does. In the sensing category, the 'If touching' block lets you select edge. (It's always second from top, after mouse-pointer).  wink


Why

Offline

 

#4 2011-12-14 16:40:53

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Touching Edge?

http://cl.ly/0931450u2b3r3E2T081E/eieaowihfkds.gif
I’m pretty sure it exists.  tongue


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#5 2011-12-14 17:33:36

Klondikedesigns
New Scratcher
Registered: 2011-12-14
Posts: 2

Re: Touching Edge?

They should have a When I receive button that you can put in the if, repeat until, etc. blocks.

Offline

 

#6 2011-12-14 19:57:38

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Touching Edge?

That will most likely be in Scratch 2.0, but I did make a hack version of Scratch that I use for personal uses. I.E., projects that I don’t post online for various reasons.

In my hack version of Scratch, that I call “SplitzScratch” Because “Splitz” was my nickname three years ago, I made a “when I receive” boolean. Here are some other blocks I hacked:

http://cl.ly/38222121042Y3t2a2W42/SSPUSHMB.gif


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#7 2011-12-15 12:31:03

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

henley wrote:

That will most likely be in Scratch 2.0, but I did make a hack version of Scratch that I use for personal uses. I.E., projects that I don’t post online for various reasons.

In my hack version of Scratch, that I call “SplitzScratch” Because “Splitz” was my nickname three years ago, I made a “when I receive” boolean. Here are some other blocks I hacked:

http://cl.ly/38222121042Y3t2a2W42/SSPUSHMB.gif

There's already a "Costume number" reporter block, and the "Dismiss speech bubble" can be done by putting:

Say ""

So just leave it blank.

And how would a received boolean work? I mean, it takes about 0.01 seconds to send a broadcast.

Last edited by RedRocker227 (2011-12-15 12:55:43)


Why

Offline

 

#8 2011-12-15 12:48:06

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Touching Edge?

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Offline

 

#9 2011-12-15 12:53:43

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Mod is different from percentage.

50 % of 6 = 3, but 50 mod 6 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

Last edited by RedRocker227 (2011-12-15 13:48:58)


Why

Offline

 

#10 2011-12-15 13:03:15

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Touching Edge?

RedRocker227 wrote:

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Mod is different from percentage.

50 % 4 = 2, but 50 mod 4 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

LOL they both equal 2. XD

Offline

 

#11 2011-12-15 13:03:47

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Touching Edge?

RedRocker227 wrote:

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Mod is different from percentage.

50 % 4 = 2, but 50 mod 4 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

You must know, redrocker, that in programming languages the percent sign is used as modal, so that 8 % 3 would equal 2.

for "10 % 30" to equal 3 just doesn't make any sense, logically it should be "30 % of 10".

I know my maths, I'm in high school  wink

Offline

 

#12 2011-12-15 13:08:42

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

LS97 wrote:

RedRocker227 wrote:

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Mod is different from percentage.

50 % 4 = 2, but 50 mod 4 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

You must know, redrocker, that in programming languages the percent sign is used as modal, so that 8 % 3 would equal 2.

for "10 % 30" to equal 3 just doesn't make any sense, logically it should be "30 % of 10".

I know my maths, I'm in high school  wink

Gee, how could I have been programming for nearly a YEAR and not know that?!

Thanks for telling me!  big_smile

And I knew it didn't make any sense, but I thought maybe you were in a rush or something!  tongue


Why

Offline

 

#13 2011-12-15 13:39:15

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Touching Edge?

RedRocker227 wrote:

LS97 wrote:

RedRocker227 wrote:


Mod is different from percentage.

50 % 4 = 2, but 50 mod 4 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

You must know, redrocker, that in programming languages the percent sign is used as modal, so that 8 % 3 would equal 2.

for "10 % 30" to equal 3 just doesn't make any sense, logically it should be "30 % of 10".

I know my maths, I'm in high school  wink

Gee, how could I have been programming for nearly a YEAR and not know that?!

Thanks for telling me!  big_smile

And I knew it didn't make any sense, but I thought maybe you were in a rush or something!  tongue

Well, I've been programming for 4 years, and I didn't know that till last year  wink

Offline

 

#14 2011-12-15 13:48:01

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

scimonster wrote:

RedRocker227 wrote:

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Mod is different from percentage.

50 % 4 = 2, but 50 mod 4 = 2.

Mod means the remainder of a division. So 50 / 4 = 12 remainder 2. Therefore, 50 mod 4 = 2!

Ugh, I hate maths.  tongue

LOL they both equal 2. XD

Haha, that was the worst example ever!  tongue
http://fotozup.com/wp-content/uploads/2011/09/facepalm06.jpg


Why

Offline

 

#15 2011-12-15 14:47:29

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Touching Edge?

LS97 wrote:

henley, I thought N % N already existed as N mod N! Does yours do anything different?

Sshhh! Don’t tell them that!


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#16 2011-12-15 14:49:06

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Touching Edge?

RedRocker227 wrote:

henley wrote:

That will most likely be in Scratch 2.0, but I did make a hack version of Scratch that I use for personal uses. I.E., projects that I don’t post online for various reasons.

In my hack version of Scratch, that I call “SplitzScratch” Because “Splitz” was my nickname three years ago, I made a “when I receive” boolean. Here are some other blocks I hacked:

http://cl.ly/38222121042Y3t2a2W42/SSPUSHMB.gif

There's already a "Costume number" reporter block, and the "Dismiss speech bubble" can be done by putting:

Say ""

So just leave it blank.

And how would a received boolean work? I mean, it takes about 0.01 seconds to send a broadcast.

Oops, I forgot there was a “costume #” block. And I already knew about the [say []] trick, I just liked it better as it’s own block.

And why wouldn’t the boolean work? What does the delay have to do with anything?


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#17 2011-12-15 14:59:20

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Touching Edge?

henley wrote:

RedRocker227 wrote:

henley wrote:

That will most likely be in Scratch 2.0, but I did make a hack version of Scratch that I use for personal uses. I.E., projects that I don’t post online for various reasons.

In my hack version of Scratch, that I call “SplitzScratch” Because “Splitz” was my nickname three years ago, I made a “when I receive” boolean. Here are some other blocks I hacked:

http://cl.ly/38222121042Y3t2a2W42/SSPUSHMB.gif

There's already a "Costume number" reporter block, and the "Dismiss speech bubble" can be done by putting:

Say ""

So just leave it blank.

And how would a received boolean work? I mean, it takes about 0.01 seconds to send a broadcast.

Oops, I forgot there was a “costume #” block. And I already knew about the [say []] trick, I just liked it better as it’s own block.

And why wouldn’t the boolean work? What does the delay have to do with anything?

Sorry, I just realised it's '  ' received, not receiving '  '.

The last one wouldn't work because it would only be true for about 0.01 seconds.


Why

Offline

 

#18 2011-12-15 15:13:53

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Touching Edge?

RedRocker227 wrote:

henley wrote:

RedRocker227 wrote:

There's already a "Costume number" reporter block, and the "Dismiss speech bubble" can be done by putting:

Say ""

So just leave it blank.

And how would a received boolean work? I mean, it takes about 0.01 seconds to send a broadcast.

Oops, I forgot there was a “costume #” block. And I already knew about the [say []] trick, I just liked it better as it’s own block.

And why wouldn’t the boolean work? What does the delay have to do with anything?

Sorry, I just realised it's '  ' received, not receiving '  '.

The last one wouldn't work because it would only be true for about 0.01 seconds.

Oh, okay! I was also confused.  tongue  lol.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

Board footer