Total sum of Array

Get help using Construct 2

Post » Tue Nov 20, 2012 2:54 pm

Hi all,

Is there any way to add all the figures within an Array?

I know arrays can hold three types of data but I have a large array with only numeric values and I need to know the sum of the whole array without checking every value if pos...
B
25
S
8
G
6
Posts: 35
Reputation: 4,905

Post » Tue Nov 20, 2012 4:55 pm

[code]global variable count=0
+on something
-> System: set count to 0
+Array: Foreach elements
    -> System: add Array.CurValue to count[/code]
Yann2012-11-20 16:56:56
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Nov 27, 2012 12:56 pm

I'm sorry.
I tried to follow this but I can't seem to get it to work?
Is there an easier way of explaining this?
B
25
S
8
G
6
Posts: 35
Reputation: 4,905

Post » Tue Nov 27, 2012 2:18 pm

easier if you show what you are doing
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Nov 27, 2012 3:04 pm



If this loads, this is what I have done.
B
25
S
8
G
6
Posts: 35
Reputation: 4,905


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests