How do I get loopindex value as increment

Get help using Construct 2

Post » Sat Nov 28, 2015 3:12 pm

I have set repeat 10 times, but loopindex always return 0. How to get it's loop number?
Thanks.
We're just a sprite in digital earth
B
9
S
3
Posts: 43
Reputation: 970

Post » Sat Nov 28, 2015 4:06 pm

Image
Image
B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Sat Nov 28, 2015 8:56 pm

You may be using the loopindex action in the wrong place. Also, If, I remember correctly, if you use several loops on the condition box (for each included), loopindex will always return the last one.
Winstratos on:

Twitter
Facebook
Tumblr
B
12
S
5
G
1
Posts: 23
Reputation: 1,602

Post » Sat Nov 28, 2015 10:07 pm

if you have a nested loop just use loopindex("loopName")

Image
Image
B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Sat Nov 28, 2015 10:32 pm

Didn't know this one, thanks! :­)
Winstratos on:

Twitter
Facebook
Tumblr
B
12
S
5
G
1
Posts: 23
Reputation: 1,602

Post » Sun Nov 29, 2015 12:12 am

Thanks guys, it worked.

But when I add Wait in the beginning of loop like this : 0.5 * loopindex (as in https://www.scirra.com/tutorials/723/using-wait-in-loops), loopindex always return -1.
We're just a sprite in digital earth
B
9
S
3
Posts: 43
Reputation: 970

Post » Sun Nov 29, 2015 12:29 am

B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, Jackriduk, osek95 and 29 guests