This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-12-20 09:08:27

stahlt
Scratcher
Registered: 2008-09-11
Posts: 8

Score

Does anyone know how to stop a score in the middle of a script, but have the score block still show?  I have a student whose score is counting down and when it touches a certain sprite he wants the score to stop but remain there to be seen.  Can't figure it out.

Offline

 

#2 2012-12-20 11:05:20

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Score

stahlt wrote:

Does anyone know how to stop a score in the middle of a script, but have the score block still show?  I have a student whose score is counting down and when it touches a certain sprite he wants the score to stop but remain there to be seen.  Can't figure it out.

Hmm. Since I haven't seen your student's scripts I can't be sure, but one way to do it might be to put in an "if" block so that the score only counts down if the sprites are not touching. Like this, perhaps:

forever
     if <not<touching [sprite 1 v]?>>
     change [score v] by (-1)
     end
wait (1) secs
Is that similar to what you are looking for?

Last edited by scmb1 (2012-12-20 11:46:54)


http://i48.tinypic.com/2z5pqad.png

Offline

 

#3 2012-12-20 12:52:11

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Score

If alternatively the student wanted the score to completely stop updating when it touches a sprite then you could do this:

when gf clicked
repeat until <touching [sprite v]?>
change [score v] by [-1]
end


http://i50.tinypic.com/ded8m.png

Offline

 

Board footer