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
20
S
6
Posts: 143
Reputation: 1,666

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
51
S
25
G
107
Posts: 1,581
Reputation: 60,458


Return to How do I....?

Who is online

Users browsing this forum: AndreasR and 13 guests