How do I make random structures

Get help using Construct 2

Post » Mon Jun 23, 2014 7:34 pm

Hello, I want to make an infinite running game and i want to add some random structures. What i want to do is to create more of them and the Game put themselves together automatically.
B
14
S
3
G
1
Posts: 69
Reputation: 950

Post » Tue Jun 24, 2014 2:58 am

System - Every x second ---- System create "object" on layer "0" on "random(xx,xx)
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue Jun 24, 2014 11:38 am

My bad, i ment this types of structures,
Image
Image
B
14
S
3
G
1
Posts: 69
Reputation: 950

Post » Tue Jun 24, 2014 12:03 pm

store the location of the last created object and with a x% propability move the next tile left, right or just ahead of the last one.

For example:
Create a random number from 1 to 100
1-20 put the next tile one step to the left (adjust width of the object to fit with the previous coordinates)
21-40 put the next tile one step to the right (adjust width of the object to fit with the previous coordinates)
41-100 just move ahead
B
44
S
10
G
8
Posts: 437
Reputation: 6,463


Return to How do I....?

Who is online

Users browsing this forum: evillair, gamecorpstudio, jorgmaquoi, Yahoo [Bot] and 24 guests