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)
Offline
broadcast [message v] and wait //Makes it wait for everything to be done stop all
Offline
mathfreak231 wrote:
broadcast [message v] 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)
Offline
I know how.
Try this (ill try to write it in scratch blocks but if that fails ill write normally )
so lets just say that the broadcast has just been broadcasted...
broadcast [insertbroadcasthere] set [death] to [1](reset)
when gf clicked set [death] to [0]now the hiding for the obstacles.
when gf clicked forever if <(death) = [0]> say [put your scripts here] if <(death) = [1]> wait until <(death) = [0]>hope this helps
Offline
topazdragonlord wrote:
I know how.
Try this (ill try to write it in scratch blocks but if that fails ill write normally )
so lets just say that the broadcast has just been broadcasted...broadcast [insertbroadcasthere] set [death] to [1](reset)when gf clicked set [death] to [0]now the hiding for the obstacles.when gf clicked forever if <(death) = [0]> say [put your scripts here] if <(death) = [1]> wait until <(death) = [0]>hope this helps
Thank you very much!
Actually, I figured out how to do this, I now use this block
repeat untilBut thanks anyways!
Offline
Closed by request.
Offline