How do I create objects by level?

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)