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
How do I load layouts randomly?
I have several "levels" layouts in my project and I want to randomly load them.
¿Cómo puedo cargar los layouts al azar?
Tengo varios layouts "levels" en mi proyecto y quiero cargarlos al azar.
Develop games in your browser. Powerful, performant & highly capable.
I would generate a random integer using the int(random(X,Y)) function. Then do an if/else statement saying if int == 1 goto this layout, if int == 2 goto this layout, etc. Not the most elegant way, but it should work.
How do I generate such a number?