How do I format a time result

Get help using Construct 2

Post » Tue Feb 21, 2017 7:25 pm

Hi

I have two two different times in ms and I need to subtract one by other and get a result with 3 decimal digits.

Example:

Right => 0.187 - 0.165 = 0.021

I am getting 0.214 instead 0.021

Any help?
B
4
S
2
Posts: 123
Reputation: 846

Post » Tue Feb 21, 2017 8:32 pm

You're probably doing your math wrong somehow.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Tue Feb 21, 2017 8:37 pm

I am storing these numbers in variables and subtract one by other like I exemplified above. I just need to format the result.
B
4
S
2
Posts: 123
Reputation: 846

Post » Tue Feb 21, 2017 8:39 pm

Try outputting all of the values to a Text object on screen, like:

Text> Set Text > num1 & " + " & num2 " =? " & answer
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Tue Feb 21, 2017 8:40 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,614


Return to How do I....?

Who is online

Users browsing this forum: varr and 4 guests