How do I select an array?

Get help using Construct 2

Post » Sun Jun 07, 2015 8:30 pm

I might be missing something really basic because the obvious answer isn't working.

Let's say I have 10 array objects and I set value.at(0) to a number, let's say 1 to 10 also (i.e the 1st contains 1, the 2nd contains 2 etc). To get the array that contains the number 5 at value.at(0), don't I just do..

myarray.at(0) = 5... (so that's 'myarray -> Compare at X, X = 0, = to, Value = 5).

Since I put the number 5 into the 5th array, shouldn't the above 'pick' that instance, so I now have 1 array picked?

This seems like very basic stuff to me and it's how C2 works, but it's not working in my project and I'm running it through the debugger. My arrays definitely contain the values that I'm searching for, but it's just skipping past the event as though it's found nothing. Do arrays work differently?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Sun Jun 07, 2015 8:52 pm

It does actually work like this, I've just made a sample new project and it works fine, so there's something wrong with my program I guess. How do I delete / close the thread?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: David181, Shenkai the ssj, tatogame, Yahoo [Bot] and 18 guests