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
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

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
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

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
74
S
31
G
26
Posts: 994
Reputation: 20,198


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 39 guests