How do I transfer multiple selections from list to array?

Get help using Construct 2

Post » Mon Sep 12, 2016 12:57 pm

Allright, so i have a list, a button and an array. I need to choose several options from listbox and transfer them into array by clicking a button. 1st i made my list as a listbox with multi-select option - ON. 2nd On clicking on button event i created this -> Array set at 1 to listbox.SelectedText. I've tried many options, but for some reason i can get only 1 selected option into array, mo matter how many i did choose.

Any ideas?
B
4
Posts: 9
Reputation: 218

Post » Mon Sep 12, 2016 1:19 pm

Spend your capx file for me to analyze. :D
Hi I am Samuel :)

My google play
B
43
S
10
G
1
Posts: 126
Reputation: 3,313

Post » Mon Sep 12, 2016 1:41 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Sep 12, 2016 2:17 pm

It does work for me: https://i.snag.gy/gBA2ZP.jpg
You can shorten your events a bit by setting your array size to 0 1 1 and removing "Array : pop front on X axis"
Last edited by Coin-coin le Canapin on Mon Sep 12, 2016 2:21 pm, edited 1 time in total.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Mon Sep 12, 2016 2:19 pm

Coin-coin le Canapin wrote:It does work for me: https://i.snag.gy/gBA2ZP.jpg


I would not upload a non working capx, if i can help it.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Sep 12, 2016 2:21 pm

Lol ; I didn't pay attention and I thought you were the one who created this thread. :D
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Mon Sep 12, 2016 2:23 pm

Oh i smiled, and took that compliment gratefully.

Don think that 0,1,1 works, arrays with 0 on any axis are 'locked'.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Sep 12, 2016 2:31 pm

@99Instances2Go, no you can start at 0 if you Push. Try it.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Mon Sep 12, 2016 2:35 pm

blackhornet wrote:@99Instances2Go, no you can start at 0 if you Push. Try it.


Indeed. Thx for telling me wrong, i do apreciate that.
Updated:

https://drive.google.com/open?id=0B1SSu ... nFud1YxVDQ
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Sep 13, 2016 6:20 am

Thank you guys! Great community and awesome help!
B
4
Posts: 9
Reputation: 218

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests