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

#1 2013-03-11 13:36:09

kman1337
New Scratcher
Registered: 2013-03-11
Posts: 1

Broadcasting

So, I'm trying to make a Pong game but when it hits the red it doesn't broadcast it. Help

Offline

 

#2 2013-03-11 15:09:17

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

Re: Broadcasting

Well, I need to see your scripts to help you, so could you show them or upload your project?

With regards,

ErnieParke


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

Offline

 

#3 2013-04-10 00:39:52

gene_bernardino13
New Scratcher
Registered: 2013-04-09
Posts: 9

Re: Broadcasting

Uses this

broadcast [message v]

Offline

 

#4 2013-04-16 22:58:45

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Broadcasting

kman1337 wrote:

So, I'm trying to make a Pong game but when it hits the red it doesn't broadcast it. Help

There are several sources to the cause of the problem. First of all, did you put a forever block, like this?

forever//makes the sprite do something over and over again 
show// This is in a forever block. It means that it will show, continuously without end.
If a sprite is told to forever show, but receives a message telling it to hide, it will not hide, because it is told to forever show, so it will continuously show.
Because of this, you should use this block:
repeat until<>//makes the sprite do something continuously UNTIL something happens
So, let's say that you wanted the ball to hide. This is what you could do:
repeat until <touching[red line]>//Makes the sprite check if it is touching the red line
move (5) steps//while the sprite is NOT touching the red line, do this
end
hide //if the sprite is touching the red line, it hides.
Another cause is that the broadcast messages are wrong. Let's say that the ball touched the red line. It broadcasted a message.

broadcast [game over! v]
But the stage and the other sprites were told to hide if they received this:
when I receive[game over v]
Note that the ball had a exclamation mark in the message. The others did not.
So, they did not receive the message.
The solution to this is to check if the broadcast and receive messages match.
I hope this helps!  smile

Last edited by joshuaho (2013-04-17 14:19:10)


Did you know that you can go to space and see Mars by clicking here?

Offline

 

#5 2013-04-16 23:04:15

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Broadcasting

gene_bernardino13 wrote:

Uses this

broadcast [message v]

The problem is that the broadcast message isn't working.


Did you know that you can go to space and see Mars by clicking here?

Offline

 

Board footer