How do I skip loopindex?

Get help using Construct 2

Post » Wed Nov 25, 2015 7:30 am

Hello.

For example, in another language I might write

Code: Select all
for (int i = 0; i < n; i + 3) {


To skip my loop index 3 at a time. What is the best way to achieve the same effect in C2?
B
4
Posts: 14
Reputation: 230

Post » Wed Nov 25, 2015 11:33 am

With a condition, system compare for example, or conditionals in actions.
Image ImageImage
B
165
S
49
G
147
Posts: 8,047
Reputation: 96,586

Post » Wed Nov 25, 2015 3:23 pm

Or use (i < int(n/3)), and use (loopindex*3).
ImageImageImage
B
71
S
20
G
190
Posts: 3,535
Reputation: 108,344

Post » Thu Nov 26, 2015 12:19 am

Thank you for your replies. :)
B
4
Posts: 14
Reputation: 230


Return to How do I....?

Who is online

Users browsing this forum: matrixreal, Phacanu, psp321, the_Shit_hawk and 9 guests