How to save points to spend in my , Ingame store

okai so i will try to describe what i want to do as best i can

my game involves , riding on a motorbike off a ramp , and try to go as far as i can , my distance is measured using

EndX-Startx

so it takes the position were i land "EndX" and takes it away from where i started "startX"

i have that constrained to a game attribute called " game.Score

i want to take this game.score and divide it by 12 every time i jump and add it to my ingame money

so for example, if i jump and travel , 2500 meters i want to divide this by 12 and add it to my money , so it would be 208

then i click restart and jump again to earn more money " say i go 2300 meters this time i want to divide it by 12 again and add it , to the 208 i have allready earned so it would be 208+191 = 399

if you all get me if you like i will add print screens

Comments

  • iCreationZiCreationZ Member Posts: 158
    Have two attributes:
    Game Score (EndX-StartX)
    Total Money

    And a rule that occurs when you finish your jump that says;
    Change attribute :
    game.Total Money to game.Total Money + (Game Score/12)

    Where game score is the figure you've already worked out as you've previously explained.

    Then in your shop, simply use the value of game.Total Money

    Simple! :D
Sign In or Register to comment.