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
21
S
11
G
3
Posts: 39
Reputation: 3,365

Post » Wed Dec 07, 2016 4:18 pm

The expression int(List1.SelectedText & List2.SelectedText & List3.SelectedText & List4.SelectedText) should work.
B
76
S
31
G
27
Posts: 1,017
Reputation: 20,794

Post » Wed Dec 07, 2016 4:27 pm

Your code worked out great, thank you.
B
21
S
11
G
3
Posts: 39
Reputation: 3,365


Return to How do I....?

Who is online

Users browsing this forum: donstathemonsta, Elliott and 29 guests