Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
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 a loop and a variable called var1. On the first run of the loop I want it to spawn a piece of a road and for each run after that it should put the next piece of road starting from where the last piece went down. What I've noticed is that I can't put this all in one loop. Here's a link to the capx, you can download that to look at the code. Maybe I'm just doing something wrong (in the code to make it simple I'm just trying to put a red dot on the ends of the road that were put down in the first part of the loop).
Develop games in your browser. Powerful, performant & highly capable.
There's no link to the capx to check, but I imagine that you can achieve what you want using something like:
repeat 5 times| System spawn roadSprite at (X + roadSprite.Width*loopindex), Y
...where X and Y are your starting points.
Thank you so much, that did the trick. I was not using a local variable, instead I was referencing the sprites that were being created directly and that was not working. Now it's working perfectly