Im trying to figure out how I can make av variable, linked to a text object, 1000000 display as 1 million, or even 30000000 display as 30 Million.
Any ideas?
Develop games in your browser. Powerful, performant & highly capable.
we will call the number Quantity
to display quantity as millions, we can do:
set text to: int(Quantity/(10^6)) &" Millions"
if quantity is 39 673 829 , it will display as 39 Millions
we will call the number Quantity to display quantity as millions, we can do: set text to: int(Quantity/(10^6)) &" Millions" if quantity is 39 673 829 , it will display as 39 Millions
Perfect!
And do you have an idea how I could add commas to my int variables? Say 153000 is displayed as 153.000 instead?
Wait, thats wrong. Im confusing myself.
What I need is 1500 to be displayed as 1 500.
150000 = 150 000
1500000 = 1.5 Million
1500000000 = 1.5 Billion
Thx