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: 164
Reputation: 1,910

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
53
S
27
G
114
Posts: 1,697
Reputation: 64,442


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests