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

#1 2007-06-22 11:57:56

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Suggestion ---> Make a sensing hexagon that says...

..."repeat until I receive..." You could also make it a control block. Or make the repeat a control and the until I receive a sensing. This would be helpful --> so you can make a sprite do something until you receive. Doing a forever does not work.

I also agree with the stop sprite.


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#2 2007-06-22 15:11:01

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Suggestion ---> Make a sensing hexagon that says...

by recieve i asume you mean recieve a broadcast.  if so i second that because it would be very useful.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#3 2007-06-22 15:25:00

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Suggestion ---> Make a sensing hexagon that says...

Repeat until I recieve <message>
and
wait until I recience <message>
would both be *very* useful blocks.

Offline

 

#4 2007-06-22 15:39:19

Duncan
Scratcher
Registered: 2007-05-15
Posts: 47

Re: Suggestion ---> Make a sensing hexagon that says...

Would a variable switch not do the job?

Make a variable StopSprite

set StopSprite to 0

repeat until StopSprite = 1
  Do some stuff


Elsewhere do some other stuff until the point when you need to StopSprite.

Offline

 

#5 2007-06-22 16:03:31

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Suggestion ---> Make a sensing hexagon that says...

Using variables is not quite equivalent to messages.  Plus the blocks for handling messages are better designed than the blocks for handling variables--- the pulldown lists are much handier than scrolling through the variable pane, and large numbers of variables seem to break scratch sometimes.

As an efficiency issue, if properly implemented, waiting for a message is a much more efficient daemon than waiting for an arbitrary boolean expression.  The implementation should be pretty easy, since the "when I receive" blocks are just
    forever
         wait until I  receive <msg>
         body
That is, the code for doing wait until I receive must already be implemented.

Offline

 

#6 2007-06-22 20:16:19

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Suggestion ---> Make a sensing hexagon that says...

Duncan: This would take awhile and be very annoying, but can be done.

kevin_karplus: I agree on both posts.

bigB: YES!!


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#7 2007-07-12 18:39:21

astrosapien
Scratcher
Registered: 2007-07-06
Posts: 1

Re: Suggestion ---> Make a sensing hexagon that says...

agreed, could be very useful for eliminating bugs

Last edited by astrosapien (2007-07-12 18:39:59)

Offline

 

#8 2007-07-16 17:05:53

DaveyJJ
Scratcher
Registered: 2007-07-16
Posts: 5

Re: Suggestion ---> Make a sensing hexagon that says...

kevin_karplus wrote:

Repeat until I recieve <message>
and
wait until I recience <message>
would both be *very* useful blocks.

Agreed. These two are only one of a very small handful I can think of that are obvious gaps.

Offline

 

#9 2007-07-16 17:14:01

Dave911
Scratcher
Registered: 2007-06-27
Posts: 36

Re: Suggestion ---> Make a sensing hexagon that says...

I agree whole heartedly. Duncan spoke about switches which i use often but they are much harder to work and sometimes they arent suitable where a 'i receive' hexagon block would.

Offline

 

#10 2007-08-13 11:45:32

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Suggestion ---> Make a sensing hexagon that says...

When developing PSP 1.5, I found multiple instances I could use this. Sometimes I did use the variable, though.


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#11 2007-12-31 01:07:22

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Suggestion ---> Make a sensing hexagon that says...

This will be very useful, and it was discussed before. There really should be a "when I recieve (mesage)" triangular block.


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#12 2007-12-31 08:57:47

Jman720
Scratcher
Registered: 2007-11-27
Posts: 1000+

Re: Suggestion ---> Make a sensing hexagon that says...

Agreed


Solve for x
2+3+2+(-9)+1x+2x=7

Offline

 

#13 2008-09-12 20:22:46

TimeFreeze
Scratcher
Registered: 2008-08-11
Posts: 500+

Re: Suggestion ---> Make a sensing hexagon that says...

my friend and I were thinking the exact same thing!


There are 10 types of people in this world: Those who understand binary, and those who don't. --[insert unrelated transition]-- GRANDILOQUENCE FTW!

Offline

 

#14 2009-07-21 03:13:32

tezcatlix
Scratcher
Registered: 2009-06-02
Posts: 16

Re: Suggestion ---> Make a sensing hexagon that says...

Yeah, i´m very agree with this, i was thinking too the same thing?

But, why just for receiving broadcasted messages?

I´ve proposed messages sent to a single Sprite, like : < Send to [ Sprite ] [message] >

that would help too to make code clearly and we could 'teach' certain sprites to respond like customized functions or procedures helping another sprites like libraries.

http://scratch.mit.edu/forums/viewtopic.php?pid=164604#p164604
http://scratch.mit.edu/forums/viewtopic.php?pid=164596#p164596

Offline

 

#15 2010-02-15 08:48:56

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Suggestion ---> Make a sensing hexagon that says...

kevin_karplus wrote:

Using variables is not quite equivalent to messages.  Plus the blocks for handling messages are better designed than the blocks for handling variables--- the pulldown lists are much handier than scrolling through the variable pane, and large numbers of variables seem to break scratch sometimes.

As an efficiency issue, if properly implemented, waiting for a message is a much more efficient daemon than waiting for an arbitrary boolean expression.  The implementation should be pretty easy, since the "when I receive" blocks are just
    forever
         wait until I  receive <msg>
         body
That is, the code for doing wait until I receive must already be implemented.

Yeah.

Also, the same is:
forever
     if I receive <msg>
            body

Offline

 

#16 2010-02-15 15:26:50

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Suggestion ---> Make a sensing hexagon that says...

kevin_karplus wrote:

forever
         wait until I  receive <msg>
.

Wait until I receive monosodium glutamate?
Sorry, the nerd in me just couldn't resist.
However, these are some very good ideas.
I suppose that having these handled by squeak would be faster...
You could use jens' latest BYOB to add this using elements.

However, I will certainly try to get this into Streak soon.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

Board footer