How do I Call Array by name

Get help using Construct 2

Post » Mon Oct 17, 2016 8:57 am

Hello
if i have :
Array1=[1,2,3,4]
Array2=[a,b,c,d,e,f,j]
Array3=[apple,banana]
.
.
.

how i can call and check array by name
system > for 0 to Array[loopIndex]

Or
system > set value >some variable = Array[XX].At(index)


i do this by call every array but this is not effective , if i need to update something i nedd to update code for all Arrays on my project :(
B
14
S
2
Posts: 35
Reputation: 816

Post » Mon Oct 17, 2016 9:25 am

Each array is a separate object right? You just use the object name.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Mon Oct 17, 2016 11:53 am

yes each one got it's name

but i think my idea not clear

i need to do this : myVariable = Array[value1].At(Value2)

is this possible on C2
B
14
S
2
Posts: 35
Reputation: 816

Post » Mon Oct 17, 2016 11:56 am

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

Post » Mon Oct 17, 2016 11:57 am

is this possible on C2?


No...

only this:
Image
Image

indexArray.capx
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Oct 17, 2016 1:57 pm

What you are describing is a two-dimensional array.
ImageImageImage
B
71
S
22
G
257
Posts: 3,791
Reputation: 142,698

Post » Wed Oct 19, 2016 10:13 am

thank you all
B
14
S
2
Posts: 35
Reputation: 816


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests