How do I find out what a loopindex is....?

Get help using Construct 2

Post » Wed Dec 03, 2014 5:39 am

Hi there,

might seem as a bit of a strange question to ask here, but I've following all kinds of tutorials on arrays.
In many capx's I find the 'loopindex' but I haven't been able to figure out exactly what it does or how to use it...
I've also looked into the manual, but that doesn't really clear up things for me.

Any help, maybe with some simple example, would be appreciated.
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,326

Post » Wed Dec 03, 2014 5:46 am

If you're in a System:For loop (say, from 0 to 10) then during the loop the expression 'loopindex' will give the value 0, 1, 2...10 or whatever you're up to in the loop at the time. If you have multiple (named) loops you can do loopindex("X") or similar, to determine which one's loopindex you'd like.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Dec 03, 2014 9:59 am

Hi Codah,

this sheds a bit of light on the loopindex.
I'll see if I can experiment a bit with it.

Thanks for your quick reply!
Have a nice day!
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,326


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests