Count totals in a column in an array?

Get help using Construct 2

Post » Thu Feb 27, 2014 6:36 am

Count totals in a column in an array?
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Thu Feb 27, 2014 7:01 am

Code: Select all
var temp_Sum = 0
For X = 0 to array.length-1
 Add Array.at(X,Y) to temp_Sum

Where Y is the index of the column.
temp_Sum should then be the total of this column.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Thu Feb 27, 2014 7:23 am

can I use text commands in construct 2 now?
if not, can you make a screen shot?
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Thu Feb 27, 2014 8:09 am

You don't have "text commands" in C2, but you have all the needed tools.
Here it is.
You do not have the required permissions to view the files attached to this post.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Thu Feb 27, 2014 9:23 am

i really don't see how the text representation is at all similar to the visual representation, but thanks
B
9
S
3
G
1
Posts: 191
Reputation: 1,725


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 32 guests