How do I add value to loopindex ?

Get help using Construct 2

Post » Wed Sep 28, 2016 2:55 am

How do I add value to loopindex ?
Hi, guys
I have an Array and I use "for loop" to get value from the Array, but I want to get value from position 4,8,12,16,20,.... in the Array. Can I increase loopindex to 4 values for each loop?
same as code:
for(i=0;i<10; i+=4)
Last edited by gameba on Wed Sep 28, 2016 3:59 am, edited 3 times in total.
B
34
S
16
G
18
Posts: 58
Reputation: 11,710

Post » Wed Sep 28, 2016 3:25 am

Image
B
65
S
23
G
7
Posts: 1,502
Reputation: 10,890

Post » Wed Sep 28, 2016 4:05 am

@korbaach
korbaach wrote:for3loop.capx

Thank you for your reply, but You don't understand my question, I want to increase 4 values instead of 1 value for index, not start from position 4th. Example:
Start index = 0, next index = 4, next index = 8, next index = 16.... , end index =40

Please excuse my poor English. :mrgreen:
B
34
S
16
G
18
Posts: 58
Reputation: 11,710

Post » Wed Sep 28, 2016 5:30 am

loopindex*4

instead of loopindex...
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: No registered users and 17 guests