I'm trying to figure out why the program will not stop running after either sprite touches the finish line. Instead the cat keeps going and another math problem will appear. I want it to end when either sprite touches the finish line. Cans somebody help? Thanks
http://dl.dropbox.com/u/12896730/Team%202%20Project%20improvements.sb
Offline
Ok, so basically I think with your current code one more question is unavoidable. But, you can make it stop after that one question is asked by adding:
Set Cat wins to 0
Set Rabbit wins to 0
At the top of your program. At the moment previous game wins affect the current game but this should make it stop after one question...or atleast it did for me.
An alternative would be to put the questions into a list and use a loop to read from the list, that would presumably stop before the list ended.
Hopefully this helped a bit, at least.
Offline
Hmm no that didn't fix it. I'd definitely go for the loop in that case I think but still make sure to put those sets in or you could have problems with the game ending too early.
It's up to you really but I'm not awake enough to work it out right now...I'll have another look tomorrow.
The problem at the moment is that because you have multiple codes running at the same time when one is waiting 2 seconds to speak the other is asking a question and then the rest of the if statement for that part has to be finished before it gets to the stop all...I think.
Offline
I think this belongs in All About Scratch.
Offline