How do I compare all Y values at an X? (Arrays)

Get help using Construct 2

Post » Tue Apr 11, 2017 7:07 pm

Hi!

What I want to do is to check if my array's Y values at an X are all together =0. It would be like a summation of all the Y values at an X.

Is there any way to do this? Thank you for your help! 😀
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Tue Apr 11, 2017 8:39 pm

Create ColumnSumVariable

Repeat Array.Height times - Add Array.At(x,loopindex) to ColumnSumVariable


Alternative -

Repeat Array.Height times
-> System compare values Array.At(X,loopindex) > 0 - Do something
-> Else - Stop Loop
Mistakes were made.
B
55
S
28
G
115
Posts: 1,709
Reputation: 65,116


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests