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.
Offline
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).
Offline
They should have a When I receive button that you can put in the if, repeat until, etc. blocks.
Offline
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:
Offline
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:
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)
Offline
henley, I thought N % N already existed as N mod N! Does yours do anything different?
Offline
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.
Last edited by RedRocker227 (2011-12-15 13:48:58)
Offline
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.![]()
LOL they both equal 2. XD
Offline
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.![]()
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
Offline
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.![]()
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![]()
Gee, how could I have been programming for nearly a YEAR and not know that?!
Thanks for telling me!
And I knew it didn't make any sense, but I thought maybe you were in a rush or something!
Offline
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.![]()
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![]()
Gee, how could I have been programming for nearly a YEAR and not know that?!
Thanks for telling me!![]()
And I knew it didn't make any sense, but I thought maybe you were in a rush or something!![]()
Well, I've been programming for 4 years, and I didn't know that till last year
Offline
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.![]()
LOL they both equal 2. XD
Haha, that was the worst example ever!
Offline
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.gifThere'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?
Offline
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.gifThere'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.
Offline
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. lol.
Offline