Convert score into money
Pocket_Tech
Member Posts: 50
Hey peeps,
Im designing a game where I would like to convert the players score into money they can use in a store.
for every 100 points = 1 dollar
So I have set up,
change attribute - (Money.IN) to (Game.Score)/ 100
Change attribute - (MONEY) to (MONEY)+(Money.IN)
Save Attribute - (MONEY)
Then the game resets it self to the initial scene where i have a load attribute for (MONEY).
This works correctly for the 1st time round, however after I play the game for the 2nd time it doesn't.
Example of failure
The player plays the game through to get a final score of 100, at the end of the game the player receives 1 dollar.
The players game restarts itself and 2nd time gets once again 100 points, the 100 points are divided by 100 and the player receives another dollar, however the player now has 101 dollars.
Can anyone see what is going wrong? Or have a simpler way to convert my scores into another unit and to be able to save that unit?
Thanks guys, hope i explained myself properly. By the way these are real attributes.
Im designing a game where I would like to convert the players score into money they can use in a store.
for every 100 points = 1 dollar
So I have set up,
change attribute - (Money.IN) to (Game.Score)/ 100
Change attribute - (MONEY) to (MONEY)+(Money.IN)
Save Attribute - (MONEY)
Then the game resets it self to the initial scene where i have a load attribute for (MONEY).
This works correctly for the 1st time round, however after I play the game for the 2nd time it doesn't.
Example of failure
The player plays the game through to get a final score of 100, at the end of the game the player receives 1 dollar.
The players game restarts itself and 2nd time gets once again 100 points, the 100 points are divided by 100 and the player receives another dollar, however the player now has 101 dollars.
Can anyone see what is going wrong? Or have a simpler way to convert my scores into another unit and to be able to save that unit?
Thanks guys, hope i explained myself properly. By the way these are real attributes.
Comments
set when points = 100 into a rule
Under the do section put a change attribute with change Money/dollors to money/dollors +1
-also add change attribute points to 0.
So when your points = 100 it change back to 0 and give u 1$ to spend in the shop.
attributes should b integers
I hope this works
Also, this subforum is for PAID requests so I'm moving it to the Working with GameSalad subforum.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User