How to Create Scoring System like World of Warcraft
Ok, I am trying to design a scoring system similar to WoW where you earn bronze, silver and gold coins.
In my math game each correct answer is worth 10pts. I've named this variable SCORE.
When game.SCORE = 100 you then earn 1 Bronze coin. (Change Attribute: game.BronzeScore to game.BronzeScore + 1)
This part works...what I am not clear on is how to continue to increase BronzeScore + 1 every time the SCORE increases by 100.
When you've earned 100 Bronze coins, the Bronze coins = 0 (resets to 0) and you now have 1 Silver coin.
When you've earned 100 Silver coins, the Silver coins = 0 and you now have 1 Gold coin.
So this is similar to place value mathematics...just not sure how to implement in GameSalad.
Thanks,
MARLBERT
In my math game each correct answer is worth 10pts. I've named this variable SCORE.
When game.SCORE = 100 you then earn 1 Bronze coin. (Change Attribute: game.BronzeScore to game.BronzeScore + 1)
This part works...what I am not clear on is how to continue to increase BronzeScore + 1 every time the SCORE increases by 100.
When you've earned 100 Bronze coins, the Bronze coins = 0 (resets to 0) and you now have 1 Silver coin.
When you've earned 100 Silver coins, the Silver coins = 0 and you now have 1 Gold coin.
So this is similar to place value mathematics...just not sure how to implement in GameSalad.
Thanks,
MARLBERT
Answers
constrain B = floor(SCORE/100)
constrain S = floor(B/100)
floor will take any number say 1.00001 to 1.9999999999, and make it the lowest int, in this case 1.