"I want to sum up all the instance variable of the sprite I can see on screen" i screwed up, I meant : I want to sum up all the instance variable of the sprite overlaping another sprite.
Let's call the first sprite with the different animation Ball and the other sprite Ground
When Ball is playing animation 1 = instance variable = 1
When Ball is playing animation 2 = instance variable = 2
Every tick, I want to know the sum of the instance variable of the Ball overlaping Ground, but I can move the Ball and not overlap them with Ground as I wish.
So like, if there is 2 Balls playing animation 1 and 2 playing animation 2, and the four are on the Ground, the score is 6 but then I get one animation 1 out of the Ground the score gets to 5
So it has to be constantly counting. (plus you can add or destroy balls whenever you want)
I hope that's more clear, thank you for answering !