How do I combine 4 digits into one 4-digits number

Get help using Construct 2

Post » Wed Dec 07, 2016 4:10 pm

Hello,

I have 4 ListBox objects and a button. When player selects numbers (from 0 to 9) from the ListBoxes and clicks a button a want to generate one 4-digit number.

Example: Player chooses 2, 5, 8 and 3 from ListBox, the result number should be: 2583.

I'm not sure how I can do this :(
B
20
S
10
G
2
Posts: 37
Reputation: 2,719

Post » Wed Dec 07, 2016 4:18 pm

The expression int(List1.SelectedText & List2.SelectedText & List3.SelectedText & List4.SelectedText) should work.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Wed Dec 07, 2016 4:27 pm

Your code worked out great, thank you.
B
20
S
10
G
2
Posts: 37
Reputation: 2,719


Return to How do I....?

Who is online

Users browsing this forum: ignaciosimo, nickar and 32 guests