How Do I use Sprite Fonts to display commas in a Score?

Get help using Construct 2

Post » Fri Aug 04, 2017 2:48 am

I'm working on a game that needs to display points or score in a Currency format, but I want to use Sprite Fonts.

So, 10000 should be $10,000 without the decimals.

Any thoughts on this?

Thanx!
B
2
S
1
Posts: 6
Reputation: 262

Post » Fri Aug 04, 2017 8:58 am

"$" & RegexReplace(str(10000),"\B(?=(\d{3})+(?!\d))","g", ",")

just replace the 10000 with your score variable.
Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Fri Aug 04, 2017 8:13 pm

@gameglaux

Thanx !!!
B
2
S
1
Posts: 6
Reputation: 262


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 9 guests