Save multiple game objects and spawn them all

0 favourites
  • 5 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • Hey everyone I am pretty new to using C3 and come from Unity.

    I am trying to create an endless type of game and trying to load in obstacles.

    In unity I could create a empty prefab that could hold obstacles that are in a pattern and then put those into an array and at random call a random index from that array and spawn it.

    So how can I achieve this in C3? Is there a way to create an empty holder to hold multiple objects and then load those objects?

    Hopefully this makes sense lol.

    Thanks in advance!

  • You might look into containers, if I'm guessing right (I mostly have no idea what exactly you're looking for).

    Containers are groups of objects that spawn and get picked together. You can set their default state (positions relative to each other) in the layout editor, and whenever you create one object in the container, they will all be created.

    Otherwise, families might be of use to get a random object from a group of objects.

  • Hmmm maybe I need to reword it a bit.

    What I am trying to create is a side scrolling infinite shooter and I am trying to figure out how to create a pattern of obstacles or enemies and then spawn in that pattern of obstacles or enemies.

    So say I want a section to pop up during the gameplay as the player is flying that has 4 obstacles, lets just say in a diamond shape and then an enemy in the center of the diamond shape of obstacles. Is there a way to maybe in another layout place the obstacle and enemy object and then save that data and then retrieve that data during gameplay and load it in?

  • See this post:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the link!

    It is kind of hard to wrap my head around it though. Wish there was a video tutorial about it :p.

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