How do I select arrays

  • I am trying to minimise my workflow and event length by having one event that pulls from an array. For example it pulls the first value from an array, that define the value of a variable and then after a wait the event repeats but on the next line down in the array. And I think I can do this with UID variables and basic array events.

    eg Set DataValue to array.At(value+1)

    However my game is going to have an array for every mission. And the limited knowledge approach would be to copy and paste the same event for each individual array.

    Is there a way to make an array the "active array" and then in the above event, refer every time to that "active array" while still using array events?

    ie get construct2 to place whatever array you want to use in front of the ".At" function.

  • I think I may have confused myself and looked at the problem the wrong way.

    I can technically do what I've said above, by creating an assay family. But obviously it is easier still to just have the one assay and then load in the values for the mission required. Too much inside the box thinking makes you forget you can save things outside the box as well :p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well besides that, you can pick arrays as any other object. You can also give an array an instance variable to identify it, as you do with other objects.

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