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

#1 2008-04-21 01:57:30

JimJimjaroo
Scratcher
Registered: 2008-04-21
Posts: 2

Keeping track

is it possible for the program to keep track of the number of times each sprite moves?

Offline

 

#2 2008-04-21 06:39:14

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Keeping track

A sprite will only move if it is given a command to move, one of the move blocks, right?  So all you would have to do is define a variable, zero it out at the start of the project, and have it change by one every time one of the move blocks is run.

If you want to keep track of the actual sprite motion, you would have to store the direction and distance each sprite moves for all of it's motions...that is a much tougher task as it takes a lot of storage space to keep track of all that.  There have been a couple of projects that use either screen arrays or variable arrays (both are homemade storage structures - Scratch doesn't have arrays yet) to do this.  I don't recall who made them now but let me know if you want to track them down.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-04-21 22:15:21

JimJimjaroo
Scratcher
Registered: 2008-04-21
Posts: 2

Re: Keeping track

Which command is considered a move block? Sense or motion?

Offline

 

#4 2008-04-21 22:19:07

heybrian_
Scratcher
Registered: 2008-04-04
Posts: 100+

Re: Keeping track

JimJimjaroo wrote:

Which command is considered a move block? Sense or motion?

Motion. Dark blue.

Offline

 

Board footer