Combo Score Doesn't Add Up
So I have a game where you build combos to achieve exponentially higher scores. The combo's are achieved by selecting as many of the same-type of scrolling actors, without touching dissimilar actors. I have set up my logic as such:
game value - score (int)
game value - combo (int)
game.combo = game.combo + 1 *each time same actor is selected in a row*
game.score = game.score+(5^game.combo)
The combo's reset to 0 if a dissimilar actor is selected.
The combo's work fine when only one actor was selected in a row (therefore, the combo score=5, which is right). But for each combo after 1, an extra 1 point is being added out of nowhere - if the player makes a combo of 2, the score should be 25 (ie: 5x5); 3 should be 125 (5x5x5), and so on. Instead a combo of 2 makes 26, a combo of 3 makes 127, etc.
Anyone have any ideas why an extra point is being added per combo? Thanks for the help.
game value - score (int)
game value - combo (int)
game.combo = game.combo + 1 *each time same actor is selected in a row*
game.score = game.score+(5^game.combo)
The combo's reset to 0 if a dissimilar actor is selected.
The combo's work fine when only one actor was selected in a row (therefore, the combo score=5, which is right). But for each combo after 1, an extra 1 point is being added out of nowhere - if the player makes a combo of 2, the score should be 25 (ie: 5x5); 3 should be 125 (5x5x5), and so on. Instead a combo of 2 makes 26, a combo of 3 makes 127, etc.
Anyone have any ideas why an extra point is being added per combo? Thanks for the help.