How do I make some sprites with the same distance?

Get help using Construct 2

Post » Fri Jun 09, 2017 3:50 am

I have four sprites with different sizes. I want to create them randomly in a row and have a same distance.
Example: A (width: 10), B (width: 20), C (width: 30), D (width: 5)
-> A (10) B (10) D (10) C (10): distance between two sprites
-> D (10) B (10) C (10) A
B
13
S
1
Posts: 11
Reputation: 547

Post » Fri Jun 09, 2017 11:46 am

Use a random function on start to generate the Y,X axis and save the values in a variable, after is generated call a function to spawn those sprites, for the y axis just put the y value, and for the x one increment it by 10 after each spawn.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, R0J0hound, trance and 23 guests