Discuss Scratch

joshdog2014
Scratcher
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/
rpglurker
Scratcher
100+ posts

Help With Project

Did you forget to set End=1?
joshdog2014
Scratcher
43 posts

Help With Project

rpglurker wrote:

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
Scratcher
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
Scratcher
43 posts

Help With Project

mgbk wrote:

Monitor End. I don't see it set to 1. If it does set to 1 it must set back to 0 quickly.
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.
joshdog2014
Scratcher
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?
mgbk
Scratcher
39 posts

Help With Project

Did you make Score a variable for all sprites?
ACE009
Scratcher
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
Scratcher
43 posts

Help With Project

ACE009 wrote:

“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.
OK, I see. I imported the scoring system from another project so it's that way. I guess I'll have to change it.

Powered by DjangoBB