# Score Calculation

Member Posts: 1
edited November -1
Hi,

I ve a problem with score calculation.

in my game there are 13 actors on the scene. 11 box, 1 ball and 1 wall.. Also have 11 different attribute pos1,pos2,pos3,.... pos11.

i also have a attribute called as level_done.. Every box width is 24; but when you move it with your touch its width changes to 54...

after you click the launch ball button on the screen and the ball touchs the wall then level_done goes to 1... (default 0) (this means you win the level)

first box has a rule which is like: attribute game_level_done is 1 and self _position_width is 20, change atribute pos1 to 1 (default 0) ,
second box has a rule which is like: attribute game_level_done is 1 and self _position_width is 20, change atribute pos2 to 1 (default 0) .....
last box has a rule which is like: attribute game_level_done and self _position_width is 20, change atribute pos11 to 1 (default 0)

i mean if you didnt touch or move any of the boxes before pressing to launch ball button at the end of the game total score is must be 11.
if u move or touch for example one of the boxes the score must be 10..(because the box which you touched made its pos attribute to 0)

i have also placed a display text which contains game.total.score.
when i didnt move or touch to boxes, and wall touches to wall, score showing 8..

i also placed 11 display texts which are linked to pos1,pos2,...pos11 for checking whether any of them is wrong but i see 11 different text box showing 1 each of them.

game.total.score formula is:
game.total.score=game.pos1+game.pos2+game.pos3+...+game.pos11

what is the problem, could u help me please..

thanks a lot.