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

#1 2012-02-03 03:50:23

Yoshiboy
Scratcher
Registered: 2011-12-30
Posts: 1000+

A very useful block.

I think it would make scripting allot simpler if we had a "when I receive" like

 < broadcast [???] received?> 
only that can fit inside
 wait until []
<if []>
and
<repeat until[]>
Blocks. It would allow us to do much more and it would shorten the amount of scripts we need. For example:
when gf clicked
wait until < broadcast [go] received?>
<repeat until<Broadcast [game over] received?>>
<if <key[space]pressed?>>
move [10] steps
<end>
<end>
I think this is where I am supposed to put this.

Last edited by Yoshiboy (2012-02-03 07:42:00)


Winter...

Offline

 

#2 2012-02-03 04:17:54

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

Re: A very useful block.

Yes, it's been suggested many times before. And it would actually be <[broadcast v] received?>.

Offline

 

#3 2012-02-03 07:34:15

Yoshiboy
Scratcher
Registered: 2011-12-30
Posts: 1000+

Re: A very useful block.

Okay, thanks. I fixed it.

scimonster wrote:

Yes, it's been suggested many times before. And it would actually be <[broadcast v] received?>.


Winter...

Offline

 

#4 2012-02-03 09:12:42

mattlai2
Scratcher
Registered: 2011-12-06
Posts: 100+

Re: A very useful block.

I think that it shouldn't fit inside the "if" block...

Offline

 

#5 2012-02-05 12:34:26

Yoshiboy
Scratcher
Registered: 2011-12-30
Posts: 1000+

Re: A very useful block.

Why not?

mattlai2 wrote:

I think that it shouldn't fit inside the "if" block...


Winter...

Offline

 

#6 2012-02-06 04:48:37

mattlai2
Scratcher
Registered: 2011-12-06
Posts: 100+

Re: A very useful block.

Yoshiboy wrote:

Why not?

mattlai2 wrote:

I think that it shouldn't fit inside the "if" block...

Broadcast is an action, and it will only last for, like, 0.1 s.

Offline

 

#7 2012-02-06 04:52:39

Liru
Scratcher
Registered: 2012-01-11
Posts: 1000+

Re: A very useful block.

mattlai2 wrote:

Yoshiboy wrote:

Why not?

mattlai2 wrote:

I think that it shouldn't fit inside the "if" block...

Broadcast is an action, and it will only last for, like, 0.1 s.

Enough time for it to run.

Offline

 

#8 2012-02-06 05:04:26

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: A very useful block.

The 'repeat until' and 'wait until' blocks would be useful though.


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#9 2012-02-06 07:02:47

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

Re: A very useful block.

mattlai2 wrote:

Yoshiboy wrote:

Why not?

mattlai2 wrote:

I think that it shouldn't fit inside the "if" block...

Broadcast is an action, and it will only last for, like, 0.1 s.

Actually, it lasts much less time than that, but it could be changed for this to work.

Offline

 

#10 2012-02-06 20:31:02

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: A very useful block.

Scratch team is thinking abot this for 2.0  smile


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#11 2012-02-07 07:02:51

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

Re: A very useful block.

scimonster wrote:

mattlai2 wrote:

Yoshiboy wrote:

Why not?

Broadcast is an action, and it will only last for, like, 0.1 s.

Actually, it lasts much less time than that, but it could be changed for this to work.

Actually, the timing isn't affective, when the IF spots it was true for any amount of time, it runs all of the block stack inside once, even if it became false while it was running.

Offline

 

#12 2012-02-07 09:35:42

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

Re: A very useful block.

rdococ wrote:

scimonster wrote:

mattlai2 wrote:


Broadcast is an action, and it will only last for, like, 0.1 s.

Actually, it lasts much less time than that, but it could be changed for this to work.

Actually, the timing isn't affective, when the IF spots it was true for any amount of time, it runs all of the block stack inside once, even if it became false while it was running.

But it would be false when it was checking 99/100 times.

Offline

 

#13 2012-02-09 23:02:22

wolvesstar97
Scratcher
Registered: 2011-08-31
Posts: 1000+

Re: A very useful block.

mattlai2 wrote:

Yoshiboy wrote:

Why not?

mattlai2 wrote:

I think that it shouldn't fit inside the "if" block...

Broadcast is an action, and it will only last for, like, 0.1 s.

When its broadcast and wait, it wont!


https://dl.dropbox.com/u/33551365/psyko.png

Offline

 

#14 2012-02-19 21:33:30

AIOlover
Scratcher
Registered: 2011-05-08
Posts: 100+

Re: A very useful block.

This block is quite possible. I like the idea. I'm making a mod called Argus, which basically adds programming tools, and this is one of the blocks that is already in it.


I'm currently http://blocks.scratchr.org/API.php?user=AIOlover&amp;action=onlineStatus&amp;type=text!
big_smile ~AIOlover~ big_smile

Offline

 

Board footer