Number Fields

Just started using Construct 2? Post your questions here

Post » Sun Dec 07, 2014 6:13 pm

How can I make this. I want to add up each field like the following.

Field 1: 6
Field 2: 8

Field 3: 5
Field 4 : 9

When the hit enter, a final number will be made using the following process.

6+8+5+9 = 28 8+2 = 10 1+0= 1 Their final number will be 1. How can I do this? Thanks,
B
9
S
2
Posts: 104
Reputation: 1,098

Post » Tue Dec 09, 2014 3:19 am

this might work but is meant for that scenario only, if you get a 3 digits answer it will break..

do the adding and store that value in a variable (28)
convert that value to a string STR(variable)
use left() and right() system-text functions to get the 2 and 8 and store them or convert them to numbers in the same line of code using int()

add again >> 10... repeat
Image
B
58
S
13
G
6
Posts: 271
Reputation: 12,128

Post » Wed Dec 10, 2014 4:48 am

awesome ty danuyos. I will try this.
B
9
S
2
Posts: 104
Reputation: 1,098


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 4 guests