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

#1 2013-03-02 22:47:32

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

Broadcast messages

I am making a game called shoot the enemy spaceships challenge. In it are a rocket, a enemy spaceship, warning signs and asteroids.

The rocket has 1000 lives, and the lives decrease when the enemy spaceships or asteroids crash into it. When the lives are 0, the rocket broadcasts game over. In that case, the stage would need to switch to a background that says game over, and a replay button would need to appear.
However, the enemy spaceship, warning signs and asteroids are supposed to hide, but they did not. The message was sent, but the When I recieve block was not running? How can I hide the enemy spaceship, warning signs and asteroids, WITHOUT stopping the project?

Last edited by joshuaho (2013-03-02 22:47:45)


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

Offline

 

#2 2013-03-03 09:10:58

mathfreak231
Scratcher
Registered: 2012-10-24
Posts: 80

Re: Broadcast messages

broadcast
message
and wait
Makes it wait for everything to be done
stop all


~This sig is false~
I'm on teh wiki!

Offline

 

#3 2013-03-03 16:49:17

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

Re: Broadcast messages

mathfreak231 wrote:

broadcast
message
and wait
Makes it wait for everything to be done
stop all

It will not work. THe rocket is supposed to go to x 0, y 0. It did, but it continuously showed and hid. When I clicked on the replay button, it did not hide and instead the background switched to the menu part and the play& instructions button appeared.

Oh, and one more thing. I did put a forever block for the enemy spaceship.

Last edited by joshuaho (2013-03-03 16:49:52)


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

Offline

 

#4 2013-03-23 11:12:52

topazdragonlord
Scratcher
Registered: 2013-02-22
Posts: 500+

Re: Broadcast messages

I know how.
Try this  big_smile  (ill try to write it in scratch blocks but if that fails ill write normally  smile )

so lets just say that the broadcast has just been broadcasted...

broadcast
insertbroadcasthere
set
death
to
1

(reset)

when clicked
set
death
to
0

now the hiding for the obstacles.

when clicked
forever
if
death
=
0
say
put your scripts here
if
death
=
1
wait until
death
=
0

hope this helps  smile


http://i45.tinypic.com/idumbk.png

Offline

 

#5 2013-05-02 19:09:32

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

Re: Broadcast messages

topazdragonlord wrote:

I know how.
Try this  big_smile  (ill try to write it in scratch blocks but if that fails ill write normally  smile )

so lets just say that the broadcast has just been broadcasted...

broadcast
insertbroadcasthere
set
death
to
1

(reset)

when clicked
set
death
to
0

now the hiding for the obstacles.

when clicked
forever
if
death
=
0
say
put your scripts here
if
death
=
1
wait until
death
=
0

hope this helps  smile

Thank you very much!
Actually, I figured out how to do this, I now use this block

repeat until

But thanks anyways!  big_smile


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

Offline

 

#6 2013-05-02 19:10:37

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

Re: Broadcast messages

Closed


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

Offline

 

#7 2013-05-02 19:25:46

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: Broadcast messages

Closed by request.


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

Board footer