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
3
S
1
Posts: 6
Reputation: 287

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
30
S
9
G
3
Posts: 171
Reputation: 3,329

Post » Fri Aug 04, 2017 8:13 pm

@gameglaux

Thanx !!!
B
3
S
1
Posts: 6
Reputation: 287


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests