How do I make large numbers into words?

0 favourites
  • 7 posts
From the Asset Store
Simple but fun word game. Restore an original word from shuffled letters.
  • Actually, I know how

    I set it up as :

    Money > xxxx

    Money < xxxx = System set (Quadrillion) to int(Money/1000000000000000)

    = Set text to "Money is - $" &Quadrillions & "." &int((Money-(Quadrillions*1000000000000000))*0.00000000000001) & " Quadrillion"

    Okay, all is fine and dandy, but when you reach Quintillion (and up) , it's like C2 isn't recognizing the exponent.

    So, at Quadrillion, the game will actually display " XX Quadrillion"

    But at Quintillion it'll just say "$1000000000000000000"

    And if you reach something like Septillion, it'll just show the exponent.... Like "$1e+24"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is both Money > xxxx and Money < xxxx in the same event?

    If you had a screenshot it would be easier to read (at least for me)

  • Yes, they are both conditions. It works for Million through Quadrillion, but not any further. I think it's because C2 starts recognizing the number defined as exponents. The expression like "1e+30", instead of the actual integer "1000000000000000000000000000000".

    But I don't think I can use this method using the "1e+30" type of formula.

  • Computers have a maximum range for storing integers. Javascript is further limited. What are your minimum/maximum numbers? Unless you start at 1, you can probably use a scaling factor to get accurate values.

  • It goes to scientific notation because I think the limit for an integer is 2^32 or 2^64.

  • I'm pretty sure the limit for the integer is even lower than that or it'd be working up to a Decillion. So far I want a limit to a Vigintilliion, which would be 1e+60. But I can't get past a Quintillion. I'm trying to think of more things people will spend money on, so their numbers don't get too high. I also thought about using "Vaults" or "Banks" to store a maximum, and then you start on your next storage facility, but that's kind of silly with the theme of the game.

    Eventually it'll be multiplayer and this most likely won't be an issue, but for now it's just an idle-click game. :/

  • You could always include a more "valueable" currency. /Platinum Supergold Plasma etc../

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)