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

#1 2012-05-30 13:12:38

newscratcher1990
New Scratcher
Registered: 2012-05-30
Posts: 2

Score Recording

Hi guys,

I need some help with a project i'm doing, i need to record a score for my game but cant work out to store these for each individual level? Anybody able to help out at all?

I know ill need a few variables to store the information but cant work out how to make scratch understand to count each move that the player take as a point.

Cheers guys,

Russ.

Offline

 

#2 2012-05-30 13:18:42

newscratcher1990
New Scratcher
Registered: 2012-05-30
Posts: 2

Re: Score Recording

Sorry didnt include much information about this, I need to make a score board for 8 levels and keep the score for each level stored in the score board.

I also need to make it so that the points are acrued for each move that the player makes, and the final move is obviously the overall score they will have for that level before progressing to the next.

cheers guys.

Offline

 

#3 2012-05-30 13:47:10

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Score Recording

Easiest way would be to make a list that you delete and then fill with 8 items that are all 0.  Then, in your character's movement script(s) use this block:

replace item (level) of [scores v] with ((item (level) of [scores v])+(1))


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#4 2012-05-30 13:47:51

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Score Recording

In your movement script, after the move itself, try this script:

if <(level) = (1)>
 change [level1score v] by (1)
end
if <(level) = (2)>
 change [level2score v] by (1)
end
if <(level) = (3)>
 change [level3score v] by (1)
end
if <(level) = (4)>
 change [level4score v] by (1)
end
if <(level) = (5)>
 change [level5score v] by (1)
end
if <(level) = (6)>
 change [level6score v] by (1)
end
if <(level) = (7)>
 change [level7score v] by (1)
end
if <(level) = (8)>
 change [level8score v] by (1)
end
Sorry if this doesn't help, I need your movement script to do this right.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#5 2012-05-30 13:53:02

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Score Recording

You can do the scoring however you feel is best, but for the recording of scores, do this.

when I receive [next level v]
add (score) to [score list v]
set [score v] to [0]
Just duplicate this for each broadcast to start a new level.

Last edited by sonicfan12p (2012-05-30 13:53:51)


Why are the secret organizations getting all the attention?  mad

Offline

 

#6 2012-05-30 14:01:57

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Score Recording

I'd definitely go with the list, myself.


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

Board footer