Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Maths Game Bug - Only one Sprite triggering next level
- primarycomputingbiss
- Scratcher
2 posts
Maths Game Bug - Only one Sprite triggering next level
Hi,
I'm creating a maths game where two sprites race, one moving automatically, the other moving when the questions are correct. My problem is that the next level feature only works when the player wins the race. For some reason if the automatic sprite wins, it doesn't work.
https://scratch.mit.edu/projects/517289927/
Thanks in advance.
I'm creating a maths game where two sprites race, one moving automatically, the other moving when the questions are correct. My problem is that the next level feature only works when the player wins the race. For some reason if the automatic sprite wins, it doesn't work.
https://scratch.mit.edu/projects/517289927/
Thanks in advance.
- mstone326
- Scratcher
1000+ posts
Maths Game Bug - Only one Sprite triggering next level
On your player sprite, level 1 is still running when level 2 starts, and so on for all the broadcasts. At the top of when I receive level 2 and all the the rest of the level broadcasts, put a stop other scripts in this sprite and you should be good to go.
High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
- The_Imaginarium
- Scratcher
1000+ posts
Maths Game Bug - Only one Sprite triggering next level
I think it's because in your repeat until loops you only repeat until the player has won. You do not have a condition to test if the enemy has won. So all the scripts are overriding each other.
- primarycomputingbiss
- Scratcher
2 posts
Maths Game Bug - Only one Sprite triggering next level
On your player sprite, level 1 is still running when level 2 starts, and so on for all the broadcasts. At the top of when I receive level 2 and all the the rest of the level broadcasts, put a stop other scripts in this sprite and you should be good to go.
Thanks! That seems to be it. I had a feeling it was something like that and I had stop this script at the end of each one, but it didn't work.
Thanks for the help.
Cheers
- Discussion Forums
- » Help with Scripts
- » Maths Game Bug - Only one Sprite triggering next level