Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » project not following script
- Howick
-
8 posts
project not following script
So I am making a game with a plane and I have a script for controlling the plane's lights, as seen above. Every 2 seconds it switches to a costume with a white dot on the end of each wing for a tenth of a second so that it looks like there are lights on the end of its wings that are flashing, just like a real plane. However when the plane falls into the sea and the game ends, the costume changes to one with the plane in the middle of a splash and plays a splash sound effect. The problem is that while the sound effect is still playing (up until the order to stop all is ordered) the plane insists on continuing flashing its lights. Can someone explain what is happening here and tell me how to fix it please. Your help would be much appreciated Thanks, Howick.
Last edited by Howick (Jan. 19, 2016 04:57:59)
- awesome-llama
-
1000+ posts
project not following script
The plane will keep flashing lights for a max. of 2.1 seconds, because the forever script has the delays and detect the crash in the same script. There are many ways to make these scripts work better, but remove the forever block in the flash lights, because a forever block is always making it activate.
- Howick
-
8 posts
project not following script
Tried that, and it keeps flashing without the forever there (just realised I didn't need that one) but it still flashes at the end. Thanks anyway. Anything else I could try?
- Rubemaster
-
9 posts
project not following script
You know what? Make a separate sprite that's just the lights and no wings, tail, etc. Then make two scripts:

Hope this helps!

Last edited by Rubemaster (July 7, 2016 01:12:01)
- Discussion Forums
- » Questions about Scratch
-
» project not following script