How do I do a for loops? example bellow

Get help using Construct 2

Post » Sat Jan 10, 2015 7:41 pm

I want to do this in construct 2

for(I = 0; I < 10; I++)

how do I do this in the code block
B
8
S
1
Posts: 74
Reputation: 725

Post » Sat Jan 10, 2015 7:50 pm

B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sat Jan 10, 2015 8:06 pm

yeah, this still does not help me sorry
B
8
S
1
Posts: 74
Reputation: 725

Post » Sat Jan 10, 2015 8:16 pm

Are you serious? Just do a loop action and loopindex is l in your example.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sat Jan 10, 2015 8:17 pm

.
You do not have the required permissions to view the files attached to this post.
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Sat Jan 10, 2015 10:58 pm

ok that is what I thought and that is what I did, How ever when I make an array and then I insert to with Index "I" it does not let me.
B
8
S
1
Posts: 74
Reputation: 725

Post » Sat Jan 10, 2015 11:13 pm

ok had to do some extra steps, I have to create a local variable and name it I and then at the end of the action I had to add 1 to I
B
8
S
1
Posts: 74
Reputation: 725

Post » Sun Jan 11, 2015 6:07 am

The index is retrieved with: loopindex("I"), not just "I".
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Sun Jan 11, 2015 6:23 am

@mordiaky you will get better and quicker help if you follow the guidelines for posting in here, especially providing a capx file :) Can save a LOT of time

3. Make an attempt yourself first. Provide a .capx of something you tried. This shows you made an effort, proving that you're not using us as a make-your-game-for-you service, and helps convey what you're trying to do as well.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 13 guests