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

#1 2012-11-05 18:45:49

Blazingwave
Scratcher
Registered: 2012-10-27
Posts: 500+

Broadcasting

My stage is broadcasting something but my sprite is not receiving the broadcast. Does anybody know why this might be?


http://i42.tinypic.com/t8nrlh.gif  http://blocks.scratchr.org/API.php?user=Blazingwave&action=onlineStatus&online=http://i49.tinypic.com/25flloj.gif=http://i45.tinypic.com/o8i97l.gif
http://i41.tinypic.com/s1lyyo.jpg

Offline

 

#2 2012-11-05 18:54:12

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Broadcasting

Are you sure that they're broadcasting/receiving the same broadcast? And how do you know that your sprite isn't receiving the broadcast?


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2012-11-06 03:21:24

Blazingwave
Scratcher
Registered: 2012-10-27
Posts: 500+

Re: Broadcasting

The part thats not working is a broadcasting part


http://i42.tinypic.com/t8nrlh.gif  http://blocks.scratchr.org/API.php?user=Blazingwave&action=onlineStatus&online=http://i49.tinypic.com/25flloj.gif=http://i45.tinypic.com/o8i97l.gif
http://i41.tinypic.com/s1lyyo.jpg

Offline

 

#4 2012-11-10 22:30:47

GenChico
Scratcher
Registered: 2012-11-08
Posts: 100+

Re: Broadcasting

Your making sure the broadcast block is connect to a control block right? And also is the receiving blocking receiving the right broadcast?


http://i.imgur.com/Cb8HC.png

Offline

 

#5 2012-11-11 12:05:00

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Broadcasting

Well, you probably didn't place the

when i receive [go v]
in your sprite. Because how's is it supposed to know if it should do something if there's nothing there to tell it to do something.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#6 2012-11-12 15:12:07

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Broadcasting

As ErnieParke said, check both 'sides' are working, and that the two broadcast titles are exactly the same. Then maybe check that there's not a problem with the script after the recieving block. Try using single-stepping mode if you're having trouble pinpointing the problem.


Be nice, I'm an old lady  wink

Offline

 

#7 2012-11-14 11:59:17

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Broadcasting

Try some debugging "say" blocks so you can check if the broadcasts are working. Like this:

say [broadcasting...] for (2) secs
broadcast [go v]
when I receive [go v]
say [Broadcast received!] for (2) secs
do stuff
Then take out the says when you have found the source of the problem.

Last edited by joefarebrother (2012-11-14 11:59:34)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#8 2012-11-16 13:48:00

EmmaSpikes11
New Scratcher
Registered: 2012-11-16
Posts: 6

Re: Broadcasting

Hi everyone, I'm making a game on Scratch and am trying to use Broadcast to change backgrounds. At the end of every one of my backgrounds, I have a yellow strip. I have a script on my only moving sprite that is as follows: When Flag Clicked, Forever, If (touching color yellow), broadcast (change backgrounds). Then on my stage I have a script that goes like this: When I Receive (change backgrounds), next background. When my moving sprite touches the yellow strip, the backgrounds all flash wildly, and sometimes I end up on the next background, and sometimes I don't. I've tried just putting the broadcast command in an If statement, but then the code doesn't work. Does anyone know why this is or how to help? Thanks in advance!!

Offline

 

#9 2012-11-16 13:54:48

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Broadcasting

You might want to create your own topic for this.
Have tried using 'broadcast change backgrounds and wait'.? Otherwise, it'll just keep broadcasting 'change backgrounds' regardless of whether the script on the other end has finished executing. This might be why your background keeps 'flashing wildly'. And if you only want the background to change once when the sprite touches the yellow strip, make sure to add some code so  'change backgrounds' is only broadcast once.


Be nice, I'm an old lady  wink

Offline

 

#10 2012-11-19 20:18:30

Blazingwave
Scratcher
Registered: 2012-10-27
Posts: 500+

Re: Broadcasting

EmmaSpikes11 wrote:

Hi everyone, I'm making a game on Scratch and am trying to use Broadcast to change backgrounds. At the end of every one of my backgrounds, I have a yellow strip. I have a script on my only moving sprite that is as follows: When Flag Clicked, Forever, If (touching color yellow), broadcast (change backgrounds). Then on my stage I have a script that goes like this: When I Receive (change backgrounds), next background. When my moving sprite touches the yellow strip, the backgrounds all flash wildly, and sometimes I end up on the next background, and sometimes I don't. I've tried just putting the broadcast command in an If statement, but then the code doesn't work. Does anyone know why this is or how to help? Thanks in advance!!

Please make your own topic


http://i42.tinypic.com/t8nrlh.gif  http://blocks.scratchr.org/API.php?user=Blazingwave&action=onlineStatus&online=http://i49.tinypic.com/25flloj.gif=http://i45.tinypic.com/o8i97l.gif
http://i41.tinypic.com/s1lyyo.jpg

Offline

 

#11 2012-11-19 20:21:35

Blazingwave
Scratcher
Registered: 2012-10-27
Posts: 500+

Re: Broadcasting

Both sides are there and about "says" blocks there is a 'says' block directly after recieving the broadcast


http://i42.tinypic.com/t8nrlh.gif  http://blocks.scratchr.org/API.php?user=Blazingwave&action=onlineStatus&online=http://i49.tinypic.com/25flloj.gif=http://i45.tinypic.com/o8i97l.gif
http://i41.tinypic.com/s1lyyo.jpg

Offline

 

#12 2012-12-11 13:49:58

EmmaSpikes11
New Scratcher
Registered: 2012-11-16
Posts: 6

Re: Broadcasting

Um, @Blazingwave, I figured since this is the "Help with Scripts" broadcasting page, my topic might be relevant. Sorry if you think otherwise, but that was really not needed.

Offline

 

#13 2012-12-11 17:07:39

BetaSmozzick
Scratcher
Registered: 2012-02-25
Posts: 51

Re: Broadcasting

EmmaSpikes11 wrote:

Um, @Blazingwave, I figured since this is the "Help with Scripts" broadcasting page, my topic might be relevant. Sorry if you think otherwise, but that was really not needed.

Ah, actually they were kind of right. This isn't a main topic for broadcasting help; it's a specific topic that Blazingwave created for help with the problems they were having with broadcasting.

When you have a problem where you need help with scripts it's best to press Post New Topic in Help With Scripts since that way you can get more help with your specific problem. Also it allows for these threads to close when the problem is solved and be more easily used for reference.

Hope that cleared this up; sorry if it came off sounds strange ^^ And if you still need help with your problem then I do advise making a new topic since people are more likely to notice; I'll keep my eye out for one in case.

Offline

 

#14 2012-12-11 19:31:03

Tecklop
Scratcher
Registered: 2009-08-20
Posts: 63

Re: Broadcasting

Are you putting the broadcasting block inside a forever block?

Pls check that it's not broadcasting forever.

Last edited by Tecklop (2012-12-11 19:31:40)


http://neuropod.net/imagehost/uploads/ccd036346f6834ab872b4f233c158c82.png

Offline

 

#15 2012-12-18 13:29:34

EmmaSpikes11
New Scratcher
Registered: 2012-11-16
Posts: 6

Re: Broadcasting

@BetaSmozzick thanks for clearing that up for me. I was just unsure about what Blazingwave said. Sorry!  smile  BTW, my game is fixed now!

Offline

 

Board footer