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
15
S
7
G
1
Posts: 3
Reputation: 1,725

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
45
S
17
G
2
Posts: 201
Reputation: 4,471

Post » Wed May 31, 2017 2:33 am

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


Return to How do I....?

Who is online

Users browsing this forum: jasontoups and 1 guest