Call diffrent Arrays with Variables

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Heya everyone

    so in my project i have a few diffrent Arrays lets call them Array1, Array2 etc.

    What i want to do now is diffrentiate between them with variables

    example:

    set text to array&Number&.At(1,1,0)

    But construct 2 doesnt cant understand this code as an array call.

    So why not but diffrent arrays into the 3rd dimenson of one Array? Because i need the specific Height of each

    individual Array. If theres a Action for that then pls tell me i only was able to get the highest Number from every Array.

    Soo my question is, can i call Arrays with Variables or is there another way to call diffrent Arrays?

    Thank you guys for the Answers :3

  • Define a single array, with an instance variable, then call Create to create more instances, giving each a unique ID. Then pick the array by the ID. Each has an independent width/height.

  • Took be a bit to understand the concept of UIDs and how to use them but now i wrapped my head around it and it

    works the way i want it.

    Thank you for pushing me in the right direction :3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In that case what blackhornet hinted at wasn't even actual UIDs, but to create instances of your main object type (in your case array).

    The object type would contain an instance variable and each instances of the array would have a different value in this instance variable.

    This way it would be possible to pick a specific instance of the array according to the value of the instance variable.

    But in the end UID allow for the same picking efficiency.

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