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

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)