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

#1 2009-05-21 18:37:53

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Blocks not responding to my brodcast

I an making a binary-octal-decimal converter and the broadcast doesn't work. This is how I have my script:



Part 1: The "Generate" button:[blocks]
<when green flag clicked>
<forever>
   <wait until><< <mouse down?> <and> <touching[ mouse-pointer ] >>
   <broadcast[ generate ]>
   <wait until><<  <not> <mouse down?> >>
<end>[/blocks]
Part 2: The Generator:[blocks]
<when I receive[ generate ]>
<repeat( 3 )>
   <if><( <{       }> <<> 3 )>
      <repeat( 3 )>
         add  <pick random( 0 )to( 1 )) to binary  (when blocks made, nonexistent)
      <end>
      <change{       }by( 1 ) ))
   <end>
<end>[/blocks]
Help wanted!

Last edited by scratchisthebest (2009-06-07 12:04:10)


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#2 2009-05-22 02:07:20

Kiladako-T19
Scratcher
Registered: 2009-05-22
Posts: 7

Re: Blocks not responding to my brodcast

I Suggest You Blow Up The Computer.

Offline

 

#3 2009-05-22 07:14:03

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

Re: Blocks not responding to my brodcast

Kiladako-T19 wrote:

I Suggest You Blow Up The Computer.

I don't think that would give positive results...  smile


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

 

#4 2009-05-29 14:33:00

pepepaco1980
Scratcher
Registered: 2009-05-23
Posts: 9

Re: Blocks not responding to my brodcast

use when <when[ spritename ]clicked> instead to deteck the click. probably the loop take all the cpu time and doesnt let the generator to run...

Offline

 

#5 2009-06-07 11:56:48

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: Blocks not responding to my brodcast

Good idea... but I can click after I press the stop button. So I abandoned it. But good idea there!

Code:

The loop and the generator run in separate threads, 
but since there is only one CPU-just one can execute at a 
time.

I put it in the code box because it's techy.

Last edited by scratchisthebest (2009-06-07 11:57:27)


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#6 2009-06-07 11:59:36

Tag4eva
Scratcher
Registered: 2009-06-05
Posts: 100+

Re: Blocks not responding to my brodcast

scratchisthebest wrote:

Good idea... but I can click after I press the stop button. So I abandoned it. But good idea there!

Code:

The loop and the generator run in separate threads, 
but since there is only one CPU-just one can execute at a 
time.

I put it in the code box because it's techy.

Are you talking about when using scratch 1.4 or 1.3.1?

Offline

 

#7 2009-06-07 12:02:35

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: Blocks not responding to my brodcast

Nevermind. The problem is I forgot these blocks:
[blocks]<set{       }to( 0 ))[/blocks]
and
clear [ all ] of [ binary ]
. Close please!


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

Board footer