Call diffrent Arrays with Variables

Get help using Construct 2

Post » Wed Jul 06, 2016 6:32 am

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

Post » Wed Jul 06, 2016 6:43 am

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.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Wed Jul 06, 2016 8:27 am

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

Post » Wed Jul 06, 2016 12:52 pm

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.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,295
Reputation: 70,795


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, valefor and 26 guests