Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I have set repeat 10 times, but loopindex always return 0. How to get it's loop number?
Develop games in your browser. Powerful, performant & highly capable.
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.
if you have a nested loop just use loopindex("loopName")
Didn't know this one, thanks! :)
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.