Number Suffixes

Get help using Construct 2

Post » Sun May 10, 2015 10:32 am

With the current popularity of the idle game genre, I thought I'd give my own shot at it, and it's mostly math in the background I realize that simply has a GUI. But there is one thing I can't seem to get the hang of.

If you've ever played an idle game, you'll know that money (or other currencies) gets to a pretty high level. My problem is that I can't quite get my head around the logic behind number suffixes or just number formatting in general.

For instance, 1 million might be 1.00M or 1x10^6 or 1 Million and so on and so forth with larger numbers like Novemquadragintillion or 1x10^150.

How would one do this in as simplest terms as possible with the event system?

To create some specific question points:

How does one format numbers with suffixes like Million or M?
How does one format numbers with scientific notation?
How does one format numbers with a specific amount of decimal places show at all times? (1,000 as 1.00K and 100,000 as 100.00K and so forth)
How does one change from one suffix to the next forwards and back (as in gaining money and spending it per the idle game idea)?

I've pretty much got a hold on everything else but this is just something I feel like I need some extra assistance/explanation on.
B
5
Posts: 19
Reputation: 263

Post » Tue May 12, 2015 6:02 am

Here's a recent tutorial with a possible solution.
https://www.scirra.com/tutorials/1447/u ... tial-games
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue May 12, 2015 7:48 am

@R0j0hound -- This is perfect! Man, I searched the tutorial section for hours and can't believe I didn't find this. Thanks!
B
5
Posts: 19
Reputation: 263


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne and 17 guests