Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help With Project
- joshdog2014
-
43 posts
Help With Project
For some reason, once you lose the score is set to 0 and spikes keep coming. Anyone able to figure out why? Thanks! https://scratch.mit.edu/projects/162310624/
- joshdog2014
-
43 posts
Help With Project
Did you forget to set End=1?
I did. If End didn't equal 1 that could explain the spikes, but not the score reset.
Last edited by joshdog2014 (May 23, 2017 20:55:32)
- mgbk
-
39 posts
Help With Project
Monitor End. I don't see it setting to 1. If it does set to 1 it must set back to 0 quickly.
- joshdog2014
-
43 posts
Help With Project
I'll check again if it sets to 1. If it does the question is why does it set to 0 again because it's only supposed to set to 0 when it receives start and other than the score resetting none of the other Start outputs are going. Monitor End. I don't see it set to 1. If it does set to 1 it must set back to 0 quickly.
- joshdog2014
-
43 posts
Help With Project
UPDATE:
I rearranged a few pieces of code that involved setting END to 1 and it now works. However, the score still isn't working. Any ideas?
I rearranged a few pieces of code that involved setting END to 1 and it now works. However, the score still isn't working. Any ideas?
- ACE009
-
100+ posts
Help With Project
“This sprite only” variables are also specific to the clone. Because your score variable is “this sprite only,” each spike increases its own value to 1, then deletes itself, also deleting the variable that it just changed.
Last edited by ACE009 (May 24, 2017 00:09:47)
- joshdog2014
-
43 posts
Help With Project
OK, I see. I imported the scoring system from another project so it's that way. I guess I'll have to change it. “This sprite only” variables are also specific to the clone. Because your score variable is “this sprite only,” each spike increases its own value to 1, then deletes itself, also deleting the variable that it just changed.
- Discussion Forums
- » Help with Scripts
-
» Help With Project