Displaying coins in Score

HekticHektic Member Posts: 13
edited November -1 in Working with GS (Mac)
I was wondering how you can display .25 cents in a score, I am creating a game where you collect change and it adds it to your score. Quarter = .25 cents, dime = .10 and so on. But I cant figure out how to have it display as change. I have the "$"..game.score set, but it wont let me put a decimal point in there, would like the score to keep track of the money. Thanks for your help as always

Hektic

Comments

  • HekticHektic Member Posts: 13
    Ah I had it set to integer, thanks guys!
  • HekticHektic Member Posts: 13
    I am having trouble having the money display .10, it just displays .1 in the score.
    I have the score set as real, each coin is worth its amount (ie. 25=.25, 50=.50, 10=.10). But when the score is displayed in the game it just shows $2.1 instead of $2.10. Can anyone help me?
  • HekticHektic Member Posts: 13
    Yeah I am still confused, I just want to output .10 that is stored in the game, i just need to put that 0 at the end. I am not sure why the real wont just display it on the output screen.
    What I am doing is this:
    when dime collides with piggybank
    change attribute game.score to game.score+.10

    obviously in the display score its just
    Display text game.score

    Everything else works fine, if I have $$+.01 it shows $2.01
    but if I have $$+.10 it only shows $2.1

    I dont think I have to do the floor to extract that zero but if I do, then I will figure it out by watching the video just thought there would be an easier way to display that darn little 0. Thank you for your help.
Sign In or Register to comment.