Ways to call from a specific array

0 favourites
  • 3 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • I was wondering is it somehow possible to have, say 20 arrays with the same structure, and then in any moment name a global variable after one of the arrays, and then manipulate that specific array? And if it isn't, why not? :D

    My opinion is that, at least for a project with a pretty big database, it's better to have cca. 50 arrays with 500 elements, rather than a single one with 25000 elements. (not sure about C3's performance array-wise though).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As with any other object in Construct, you can create multiple instances of an array using "System Create" action. So you can have 20 instances of the same array, and pick them by instance variables, or by UID, or using some other method.

    One common implementation of multiple array instances is when array is added to a container with another object like a sprite. For example, you may have Enemy sprite and EnemyStatsArray. When they are in the same container, then each enemy will have its own instance of the array with its own unique data.

  • I think I've figured it out, it seems to work using families and instance variables. Thanks for the reply.

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