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

#1 2008-01-03 20:56:31

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

A recieve sensing block

I would REALLY like a block wheer its says       when i recive (anything you want here)
        as a sensing block like this.           wait until i recive blah blah
like a diamond sensing one becuase  you cant put the other recive block anywher but the start becuase its round edged at the top. for example what if you have a guy that has this script:             When space clicked
                             dturn to costume 6
                              wait until i recive bat
                               
                       while with another sprite...
                                                                      When flag clicked wait ten seconds. broadcast bat                       
                  so you guys with me? and you could use it to make the most equisite and elaborate games.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#2 2008-01-03 21:51:12

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

ya, that has been mentioned before. i really think that block should be considered! there are so many things i could use it.


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#3 2008-01-03 22:11:12

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

Re: A recieve sensing block

Agreed, it is a NEEDED block, I get really frusturated when I needit and it is not there. GRRRRRRRRRR


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

Offline

 

#4 2008-01-03 23:34:54

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

TOTALLY! GRRRRRRR>> tongue


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#5 2008-01-04 06:21:37

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

Re: A recieve sensing block

I too would welcome a "wait until I receive" block, and have even spent some time thinking about the semantics of such a block. (Search the forum for "semantics")

It is trickier than it looks at first, because of the "broadcast and wait" block.
If broadcasts always start a script from the beginning, then you are waiting for all scripts started by the block to finish.  But do you wait for scripts that were continued (rather than started) by a a broadcast?   Currently every script has exactly one starting condition (either a message or the greenflag), and it is easy to say when all the scripts started by a message are done.

Also, the only thing a message can do at the moment is to start new scripts.  Adding the ability to continue scripts that are waiting increases the complexity of the implementation of messages.

I think that the extra complexity in the implementation would be worthwhile to Scratch programmers, but I'm not the one who would have to implement it!

Offline

 

#6 2008-01-04 15:57:48

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

Re: A recieve sensing block

Go here: http://scratch.mit.edu/forums/viewtopic.php?id=717


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

Offline

 

#7 2008-01-04 16:05:06

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

to relyt: thats old. we need a new one that peaple will actully go to


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#8 2008-01-04 16:06:22

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

to the forum moderator: if your making an rpg game, your gonna NEED that reciveing sencing block.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#9 2008-01-05 04:30:59

pasta3049
Scratcher
Registered: 2007-10-18
Posts: 31

Re: A recieve sensing block

you can use variables

Offline

 

#10 2008-01-05 08:41:59

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

Jman720 wrote:

Agreed, it is a NEEDED block, I get really frusturated when I needit and it is not there. GRRRRRRRRRR

me too


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#11 2008-01-05 11:01:27

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

Re: A recieve sensing block

pasta3049 is right in that almost anything that can be done with "wait until I receive ..." could be done with variables:

wait until var>0
set var to 0


when I receive ...
     set var to 1

A "wait until I receive .." block would be simpler for the game programmer, though, so I think it is worth the Scratch team taking some time to work out a consistent and usable semantics for such a block.

Offline

 

#12 2008-01-05 17:27:07

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

kevin_karplus wrote:

pasta3049 is right in that almost anything that can be done with "wait until I receive ..." could be done with variables:

wait until var>0
set var to 0


when I receive ...
     set var to 1

A "wait until I receive .." block would be simpler for the game programmer, though, so I think it is worth the Scratch team taking some time to work out a consistent and usable semantics for such a block.

thatd take ALOT of time. nd thinking. and variables. I would also like a broadcast sensing block for example.                          <when green flag clicked>
                                                       <if>   <(<pick random( 1 )to(10)   <<>(5)>
                                                                <if><<  <not>  Broadcast penny >>

          OKay it dosent look so good but you get the picture.I know You could continue the script but id mix alot of things up if you were doing multiple scripts in one.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#13 2008-01-05 17:30:28

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

Re: A recieve sensing block

Heybrian, I have no idea what your code fragment is supposed to mean.

Offline

 

#14 2008-01-05 17:41:01

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

kevin_karplus wrote:

Heybrian, I have no idea what your code fragment is supposed to mean.

well it kinda messud up.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#15 2008-01-05 17:45:49

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

kevin_karplus wrote:

Heybrian, I have no idea what your code fragment is supposed to mean.

You just hafta look like its continuous. for example when youd use this :  You have a coin game.    you make them flip it and it lands on one side.
                       When flag clicked
                            if sprite coin clciked, broadcast coin

                  When i recive coin pick random number 1 out of 10.
                  if number is more than five turn to cotume "tails side"
                    if not (or if less then 5) broadcast coin heads.

                    When ir ecive coin heads change to costume heads side.

         Their you go. ive made it clear, you should understand it now.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#16 2008-01-05 18:05:54

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

kevin_karplus wrote:

Heybrian, I have no idea what your code fragment is supposed to mean.

i think its something like this:
<when I receive[ Coin
<if><( <pick random( 1 )to( 10 <<> 5 )>
<switch to costume[ tails
<else>
<broadcast[ heads

Last edited by funkymonkey (2008-01-05 18:08:03)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#17 2008-01-05 18:07:31

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

funkymonkey wrote:

kevin_karplus wrote:

Heybrian, I have no idea what your code fragment is supposed to mean.

i think its something like this:
<when I receive[ Coin
<if><( <pick random( 1 )to( 10 <<> 5 )>
switch to costume "tails"
<else>
<broadcast[ Penny

yes but when i tryed that did not work. the else didnt work.

Last edited by Heybrian (2008-01-05 18:09:15)


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#18 2008-01-05 18:11:37

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

Heybrian wrote:

yes but when i tryed that did not work. the else didnt work.

it did for me. i'll upload the project that i made with it for you

Last edited by funkymonkey (2008-01-05 18:12:32)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#19 2008-01-05 18:15:48

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

ok, here is proof that it works: http://scratch.mit.edu/projects/funkymonkey/76739 just keep clicking the coin

Last edited by funkymonkey (2008-01-05 18:16:08)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#20 2008-01-05 18:18:55

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

funkymonkey wrote:

ok, here is proof that it works: http://scratch.mit.edu/projects/funkymonkey/76739 just keep clicking the coin

not if you have like ten scripts and ur doing an rpg game. that is one script. imagine a 1 week long rpg game to make. it will not work .same with     
            <when I receive[shoot] >
              <repeat until> costume # =4
                  <next costume>

Last edited by Heybrian (2008-01-05 18:19:53)


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#21 2008-01-05 18:39:10

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

Heybrian wrote:

funkymonkey wrote:

ok, here is proof that it works: http://scratch.mit.edu/projects/funkymonkey/76739 just keep clicking the coin

not if you have like ten scripts and ur doing an rpg game. that is one script. imagine a 1 week long rpg game to make. it will not work .same with     
            <when I receive[ shoot
              <repeat until> <( costume # <=> 4 )>
                  <next costume>

what is that script working for? once you know that, then you can decide if it will work.

Last edited by funkymonkey (2008-01-05 18:40:29)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#22 2008-01-05 18:51:39

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: A recieve sensing block

http://i243.photobucket.com/albums/ff67/hprules_photos/ireceive.jpg


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#23 2008-01-05 19:04:34

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: A recieve sensing block

I think that a receive sensing block would just be confusing, as it is very easy to implement with the basic commands that exist.  Instead of sending a broadcast, you could just change a variable when you want the paused script to continue (or whatever it is that you want). 

"Wait until I receive" could be done like this:

|-Forever
|  If Variable = 0
|  Wait 0.05
|  Stop Script   (this will just make the script keep waiting)
|       
|  Do the stuff you were waiting for....  (This will execute when the variable changes)
|  Varible = 0 (To keep the script from running again)

It seems just as easy to switch the value of a variable as to send a broadcast (to me).

Mr Ed

Offline

 

#24 2008-01-05 20:46:54

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block

funkymonkey wrote:

Heybrian wrote:

funkymonkey wrote:

ok, here is proof that it works: http://scratch.mit.edu/projects/funkymonkey/76739 just keep clicking the coin

not if you have like ten scripts and ur doing an rpg game. that is one script. imagine a 1 week long rpg game to make. it will not work .same with     
            <when I receive[ shoot
              <repeat until> <( costume # <=> 4 )>
                  <next costume>

what is that script working for? once you know that, then you can decide if it will work.

huh?


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#25 2008-01-05 20:48:05

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: A recieve sensing block


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

Board footer