add multiple "Array.At" values in same expression

Get help using Construct 2

Post » Thu Jul 09, 2015 1:57 am

Image
this is what im trying to do.

the expression does the first "Array.At" and then stops, ignoring all 5 other "Array.At".

any ideas?
Image
B
22
S
5
G
2
Posts: 65
Reputation: 1,724

Post » Thu Jul 09, 2015 3:09 am

Are the values in a_items strings?
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Thu Jul 09, 2015 12:33 pm

@colludium nope. small int values.

if I convert each Array.At into a separate variable first, and then add all these variables it works.

so it seems like some kind of multiple Array.At/expression limitation.
Image
B
22
S
5
G
2
Posts: 65
Reputation: 1,724

Post » Thu Jul 09, 2015 2:00 pm

I've also experienced something like this before - and ended up using the same work-around that you've already found. I think it is a limitation of the c2 engine, although I've never seen any documentation to confirm that view...
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Thu Jul 09, 2015 2:42 pm

Tried encasing the Array.At() in int() functions ? Maybe that'll force the calculation on numbers.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, David181, luckyrawatlucky and 5 guests