Displaying decimal numbers as text

omnigameomnigame Member Posts: 4
edited November -1 in Working with GS (Mac)
Hi,

I want to display numbers with decimals (such as 2.0 or 2.5) as text, but GameSalad won't let me. The number 2.0 is displayed as 2, while 2.5 is displayed as 2.50. If I use a comma instead of a period, it works, as long as I put it inside quotation marks, but I want the numbers to be displayed properly.

Please advice. Thank you!

Comments

  • omnigameomnigame Member Posts: 4
    Is there no solution to this problem?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    how are you storing the numbers? what kind of attributes are they?
  • omnigameomnigame Member Posts: 4
    Thank you for replying!

    I am using the Display Text behavior on a button. This way I can use different instances of the same image, but have each instance display different numbers,
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    I think you have to set up a interger attribute, and depending on what number you want displayed, you update that attribute to that number, and then in display text you choose that interger attribute. That should work
  • VoidedSkyVoidedSky Member Posts: 1,095
    Yes, Integer is numbers like: -2,-1,0,1,2,3,4,5..... and Real are numbers like: 1.083749, 45.7800023, 2.45.... make sure you select REAL for the attribute.
    ~CTM
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    CowTechMan said:
    Yes, Integer is numbers like: -2,-1,0,1,2,3,4,5..... and Real are numbers like: 1.083749, 45.7800023, 2.45.... make sure you select REAL for the attribute.
    ~CTM

    Ah, i knew it was one of the two! To little sleep for me lol :)
  • omnigameomnigame Member Posts: 4
    Thank you! I'll try doing that.
Sign In or Register to comment.