How do I force a number to display 2 decimal places

Get help using Construct 2

Post » Tue Feb 14, 2017 9:57 am

I am trying to make a coin recognition game for children.

When a coin is dragged to the piggy bank the value of the coin is taken away from the piggy banks total.

I've got the basics working as I want but I cannot get the text to display to 2 decimal places.

For example;

£2.33 displays fine but £2.30 displays as £2.3.

How can i get the text to always show 2 decimal places?

Here is the cap.x of where i've got up to so far:
https://dl.dropboxusercontent.com/u/155402113/piggy_bank.capx

Matt
B
8
S
1
Posts: 28
Reputation: 506

Post » Tue Feb 14, 2017 6:35 pm

Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,613

Post » Wed Feb 15, 2017 7:49 am

Thank you @GamerGon for pointing me in the right direction.

I actually found this tutorial:
viewtopic.php?t=89076&start=0

To be more suitable for what i was trying to achieve.
B
8
S
1
Posts: 28
Reputation: 506

Post » Thu Feb 16, 2017 1:59 pm

No problem, good luck @mattdaly!
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,613


Return to How do I....?

Who is online

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