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
169
S
50
G
169
Posts: 8,284
Reputation: 108,212

Post » Wed Nov 25, 2015 3:23 pm

Or use (i < int(n/3)), and use (loopindex*3).
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,852

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: facecrime, mihirolover and 6 guests