Score question (advanced) Math Genius are you out there?
JoeMeister
Member Posts: 602
Alright my player collects coins for every 10 coins collected he/she gets a Bonus. I set up an attribute called CoinsCollected. So every time the player collects 10 coins that attribute is set to true. Music plays and confetti comes out of a Cannon. Collect 10, 20, 30 ... .
Here is my problem. As far as I know I hve to create an endless amount of "If score is 10 then change attribute to true" "If score is 20...and so on.
This is getting very tiring if I have to go up to 1 Million.
Any suggestions?
Thank you.
Here is my problem. As far as I know I hve to create an endless amount of "If score is 10 then change attribute to true" "If score is 20...and so on.
This is getting very tiring if I have to go up to 1 Million.
Any suggestions?
Thank you.
Comments
Create a rule that says when attribute =10 change coins collected attribute to true.
Then another rule thats says when bonus count is greater than 10 change back to 1.
Hope this helps
-Darren.
Have a great weekend.
When score%10 = 0
-- Change Attribute: CoinsCollected To: true
otherwise
-- Change Attribute: CoinsCollected To: false
If starting as a rule looking at an attribute you cant insert the modulo function.
You could stick the modulo rule on the score counter but that will just loop it up in increments of 10.
If I understand correctly it needs to count up;
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 .....
But every 10, trigger the bonus!
When you score a point make the 'bonus check' = '(bonus check'+1)%9
When the bonus check = 9 then do your bonus thing (whatever that is).
Something like that.