Need help with player numbers input

RocketBrainRocketBrain Member, PRO Posts: 269
edited November -1 in Working with GS (Mac)
so i've built a num pad. and i have it set so it displays a value as the player inputs....but its backwards. Basically what i've done is each time you hit a number it assigns a value to an individual attribute that is multiplied by its place number.

answertotal = answer1 + (answer2*10) + (answer3*100).....

i want it to work like you would have a calculator but i cant get it to work. the way i have it works but it inputs each new number on the left side rather than the right. So 3,2,1 becomes 123.

is there a better way of doing this? ive heard the "strings" tossed around with this subject before

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    you will need to add a counter to determine the total number of values and then work backwards in your multiplication lots of if > rules I'd expect.
Sign In or Register to comment.