How do I load layouts randomly?Puedo cargar layouts al azar?

Get help using Construct 2

Post » Wed May 31, 2017 1:44 am

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.
B
16
S
7
G
1
Posts: 3
Reputation: 1,750

Post » Wed May 31, 2017 1:55 am

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.
Image
B
47
S
17
G
3
Posts: 206
Reputation: 5,061

Post » Wed May 31, 2017 2:33 am

How do I generate such a number?
B
16
S
7
G
1
Posts: 3
Reputation: 1,750


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 25 guests