How do I create objects by level?

Get help using Construct 2

Post » Fri Aug 25, 2017 1:29 am

I have been trying to figure out how to spawn objects from a family based on an in-game variable. In theory, as the score goes up, the level increases and different objects spawn from a single moving spawner. I just cant figure out how to choose the object from the family that i want to spawn
B
8
S
2
Posts: 2
Reputation: 504

Post » Fri Aug 25, 2017 11:06 am

If you have multiple objects for each level and want to choose a random object from that level selection, then I would have a family per level and use code along the lines of:

If level = 1 | Spawner spawn family1
If level = 2 | Spawner spawn family2

...etc.

Spawning from a family automatically chooses a random object.

If however you want to spawn a specific object, then the family doesn't help you so much and you're better off using:

If level = 1 | Spawner spawn object1
If level = 2 | Spawner spawn object2

In Construct 3 you can spawn objects by name, which allows you to reduce the total number of events but in C2 you have to call object spawns in separate conditions or use a 3rd party plugin.
B
24
S
9
G
4
Posts: 515
Reputation: 4,472


Return to How do I....?

Who is online

Users browsing this forum: Colludium, JoniArtha and 7 guests