Arrays...

Just started using Construct 2? Post your questions here

Post » Wed May 28, 2014 12:42 am

I'm sure this is a beginners question and I'm just missing something.

So what I wanna do is pull info from an array and use that info to place one object onto another. I would like to correspond the cell number to one object's UID and the value info as another object's UID. Using this on a large scale with multiple instances to randomize blocks on a grid. I haven't really been using Array's so I'm kinda confused by all this.

For instance:
My Array's X cell 0 has the value of 23.
So I'd like to pick a Block with the UID(or IID) of 0
And place it on top of the Grid square with the UID(or IID) of 23
And do this for every instance of Block there is

Right now I have the conditions:

Code: Select all
Array Repeat for each X element
Block: Pick instance with UID Array.CurX
Grid: Pick instance with UID Array.CurValue

However that's not doing what I want. I feel I'm in the right ballpark but not sure what exactly needs to be put down in the event condition.
B
13
S
3
G
2
Posts: 45
Reputation: 2,308

Post » Wed May 28, 2014 1:08 pm

could you maybe create a small drawing in paint (or something) of what it is you want to do? Some other approach might solve your issue. (Just trying to understand what the problem really is)
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed May 28, 2014 2:38 pm

SHow.jpg


So I want to connect the Array cell number to the UID(or IID) of the grey box, and the value of the Array at that cell to the Black box UID(or IID). That way I can pick two boxes based on those numbers and automatically make them line up.
You do not have the required permissions to view the files attached to this post.
B
13
S
3
G
2
Posts: 45
Reputation: 2,308


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest