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?