Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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.
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.
Develop games in your browser. Powerful, performant & highly capable.
How do I generate such a number?