How do I RegEx event sheet FormatCurrency?

Get help using Construct 2

Post » Tue Aug 01, 2017 6:21 pm

Read a few posts, but am still confused at where exactly one uses regular expressions (RegEx) to Format Currency or insert commas into a score.

Would it be a global variable?

Would it be a function call?

Example here:

"FormatCurrency"

RegexReplace(Function.Param(0) & "", "\d(?=(\d{3})+\.)", "g", "$&,")

My problem is for global variable "Score" that I want to display as currency with commas. I have an "init function" which includes "System to Set Score to Zero" and a "set text to Score" action.

So would I start a sub-event or create a function with a sub-event to display "Score" as currency with commas?

Thanx !!!
Last edited by Gaming 2017 on Fri Aug 04, 2017 2:08 am, edited 1 time in total.
B
2
S
1
Posts: 6
Reputation: 262

Post » Fri Aug 04, 2017 2:06 am

Maybe that I'm using Sprite Fonts and RegEx.Replace is not working for me.

Any thoughts on this?

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


Return to How do I....?

Who is online

Users browsing this forum: vegapomme27, Yahoo [Bot] and 8 guests