concatenate 2 single integers into one whole number through attribute

PeeCeePeeCee Member Posts: 107
edited January 2012 in Working with GS (Mac)
Hi.
Something so simple is not working for me.
I have a set of number on screen that a user can select numbers from 1 to 10. i want another actor
to be able to take/accept the numbers and concentate them together as though they are one number now.

e.g. User hits number 1 and the same user hits number 6.
I need the concatenated attribute to merge the two number to now be 16.

Im told to concatenate you use .. between attribute variables.

any help would be appreciated.

Comments

  • OkyshoOkysho Member Posts: 158
    take ingeter 1 and multiply it by 10 then add it to integer 2. Do this when concatenating the strings
  • PeeCeePeeCee Member Posts: 107
    cheers okysho. if i do this in string , how can i convert back to integer.

  • OkyshoOkysho Member Posts: 158
    sorry, that was inproper. Not done in strings, just do it in integers. (recently spent a lot of time in programming class "concatenating strings") There's no parsing in game salad. the values are just displays, so manipulate them as you see fit behind the scenes where no one can see them
  • PeeCeePeeCee Member Posts: 107
    thanks i've got things working now. but do you know of a way to change attribute to a string attribute as back to empty or nothing etc.
Sign In or Register to comment.