How do I select arrays

Get help using Construct 2

Post » Mon May 30, 2016 6:34 am

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.
Posts: 5
Reputation: 206

Post » Mon May 30, 2016 6:57 am

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
Posts: 5
Reputation: 206

Post » Mon May 30, 2016 10:01 am

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.
Posts: 2,493
Reputation: 20,950

Return to How do I....?

Who is online

Users browsing this forum: Naurgalen and 12 guests