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
Game development stories & opinions
https://www.dropbox.com/s/tnnrbesnh5irj ... .capx?dl=0 - I am working on the mechanics of a simple running platformer game, however have a small issue which I cannot figure out. In step9, the y-coordinate of the block is set at random(LayoutHeight - self.height). Is there a way to change that to depend on the previous y-coordinate of the block? example can only be 100px above or below previous position?
You would need to store the previous position.Y in a variable and then use the < and > in condition for next spawn...
Develop games in your browser. Powerful, performant & highly capable.
Can you explain the second part further, I have stored the y position as a global variable. However I don't know how to do the second part.
I guess instead of:
random(LayoutHeight - self.height)
Thanks a lot For some reason I thought random values can only be between 0 and another number.
You have to remember the variable is holding a number value in this case so it can be randomized as well.