Average score statistic

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
Hey guys I need help implementing some math logic.

I just want to keep track of the players average score. Would I need a "times played" attribute for it to divide by? Or how would you fellas go about it?

Cheerski

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    if you had 4 scores and you wanted the average of them, you would have a attribute for each score and have it like so:

    (score1attibute+score2attribute+score3attirubte+score4attribute)/4

    its just plain averaging in math, change it up however you need it
  • bluebyu25bluebyu25 Member Posts: 500
    Well I mean average score over the life of the app.....it would load everytime you played the game.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    well you could do as i posted above, and then keep changing the 4 score attribute to you 4 highest scores everytime you play. so itll give you your new average everytime
  • bluebyu25bluebyu25 Member Posts: 500
    Ahhh....execellent
Sign In or Register to comment.