[Solved] How do I create multiple instances of an array?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello all,

    I have three objects that spawn enemies. I want to store the enemies in an array. The array will be 3D (Level, wave, enemy type).

    The spawner objects will look into the array and depending on the current level and wave, they'll spawn enemies specific to that level/wave combination.

    I want the three objects to use the same function to spawn enemies. I thought if I could create three copies of the array and have an instance variable to differentiate each array from the other, I could use the same function to spawn enemies (because the array will have the same name but the instance variable will have a different number).

    Is this possible? I tried dragging the array to the layout to create a copy but that didn't work.

    Thanks.

  • You can create the array like any other object, using System:Create object. You can also place an array in a Container, for each spawning object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much BlackHornet. Works perfectly.

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