How do I Add a Decimal Point to a Number

Get help using Construct 2

Post » Tue Jun 03, 2014 8:23 pm

I have a number variable called NumValue. I want to add a decimal point to the end of the number. I've tried the following:

Add "." to NumValue
Set NumValue to NumValue & "." (BTW, this works for numbers)
Set NumValue to NumValue + "."

None of these worked. Any help would be greatly appreciated.
B
9
S
1
Posts: 8
Reputation: 1,043

Post » Tue Jun 03, 2014 8:27 pm

You can't add a decimal point to a "number" type. What are you actually wanting to achieve?
ImageImageImage
B
71
S
21
G
232
Posts: 3,695
Reputation: 129,866

Post » Tue Jun 03, 2014 8:29 pm

I working on a calculator so I need to be able to add a decimal point to the current displayed number.
B
9
S
1
Posts: 8
Reputation: 1,043

Post » Tue Jun 03, 2014 8:33 pm

I think you d be better off having a string representing the number, then translate it to a number when the calcul is needed.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, Sup with that? and 53 guests