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
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
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))
Offline
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) endSorry if this doesn't help, I need your movement script to do this right.
Offline
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)
Offline