How do I move my array to the next level?

  • Hello everyone!

    I have an array that moves and detects collisions of enemies. It works well on level 1 but on level 2 it doesn't exist on the layout objects like it does on level 1. I tried to drag it on the level but construct doesn't allow me to do that.

    My question is: How can I copy paste this array from level 1 objects to level 2, 3, 4, etc. I didn't create it myself, it was from a tutorial.

  • Arrays are set as Global by default, so there should be one instance of array object accessible from all layouts.

    If you don't need it to be global for some reason, then you will have to create array with events in every layout. But you can't place it manually on the layout like you do with sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm..

    Then what could possibly be the problem that non of the arrays are working, since the only thing that I did was duplicate the layout?

  • You mean the "AvailableDirections" array?

    You have this array configured as "Global = No"

    So, you have to create this array in each level, in the "On start of layout" event you will have to use "Create object" and create this array object.

  • It worked, thank you so much!

    I tried turning global to YES before, but I didn't know how to activate it, so since I didn't want to break things even further I just turned it back to NO.

    Can't wait to work on this now as my new game!

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