How do I spawn a group of objects in a certain pattern?

Get help using Construct 2

Post » Sun Feb 23, 2014 11:23 am

How do I spawn a group of objects in a certain pattern? I want to spawn a lot of objects with set positions and sizes, and link them together to always spawn together in that formation. This is for a vertical endless runner game. I need to be able to spawn the formations after one another to create a randomly generated environment. I also want to be able to do this without having to create an action for every individual object that spawns them, and rather spawn them all at once somehow based on their positions in the layout. Any help would be most appreciated. :)
B
13
S
3
G
3
Posts: 62
Reputation: 2,192

Post » Mon Feb 24, 2014 6:31 am

I figured out that I needed to use tilemaps for the formations since they have collision boxes for each tile, eliminating the need for multiple objects.
B
13
S
3
G
3
Posts: 62
Reputation: 2,192

Post » Tue Feb 25, 2014 12:49 am

kota can only post plain text URLS when they have 300 rep. 1 URLS removed. Why?


SpacialPumpkin i can not send u pm due to not having 500rep its pretty retarded that i need 500rep to send msges so please add me on facebook
Banned User
B
5
S
1
Posts: 42
Reputation: 538

Post » Tue Feb 25, 2014 12:54 am

@kota

Do you have Skype? You can add me on there and we can talk, my name on it is the same, SpacialPumpkin.
B
13
S
3
G
3
Posts: 62
Reputation: 2,192

Post » Tue Feb 25, 2014 1:00 am

added you
Banned User
B
5
S
1
Posts: 42
Reputation: 538

Post » Tue Oct 06, 2015 6:56 pm

Hi

I am wondering the same but using sprites, not for environments but simply collectible items (coins for example). I'm making an endless jumper and want patterns of object the player can collect when they are in a state of accelerating upwards. There may only be 20 objects at a time. I could use an array with a list x,y pos for each items and a for loop to iterate through... or is there an easier method to spawn a single collection (of the same object) predefined in the editor(snapping, with drag and drop ease),group this, and spawn this at a given Y position in the run time?

thanks
My Games on google play

ImageImage
B
33
S
7
G
4
Posts: 100
Reputation: 3,405

Post » Tue Oct 06, 2015 8:54 pm

I'm guessing I'll have to create a click and drag editor and save out data to an array.
My Games on google play

ImageImage
B
33
S
7
G
4
Posts: 100
Reputation: 3,405

Post » Tue Oct 06, 2015 9:39 pm

@4ror
You can do it in the editor. Just setup the patterns off the layout and use a second object as the center. Group them together with a variable, then just read it into an array at the start of the layout and delete the objects.

https://dl.dropboxusercontent.com/u/542 ... terns.capx
B
92
S
32
G
110
Posts: 5,298
Reputation: 71,507

Post » Wed Oct 07, 2015 4:20 pm

That's great. Thanks for your help
My Games on google play

ImageImage
B
33
S
7
G
4
Posts: 100
Reputation: 3,405


Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag and 31 guests