How the F do I push a value on Y axis for arrays?

Get help using Construct 2

Post » Sun Jul 19, 2015 9:52 am

....
Without expanding a new damn Y every X????

Ive got two values each update per an object

var 1 var 2

Using push to pass the array

Expected:

Array Per Width Val:
cell 0: var1, var2
cell 1: var1, var2
cell 2: etcetcetcetc
cell 3:....
cell 4:........


WHAT HAPPENS:

cell 0: var1, var2

UPDATE NEW:

cell 0: var1, var2, var2
cell 1: var1, var2, var2

etc etc etc

So it keeps adding a Y, I know how to read arrays from using this on something else (works fine) but not with PUSH, push is probably doing what it is supposed to.. however I want it to push on x and Y you CANT PASS A VALUE JUST TO X WITH A Y VALUE OVER IT. So how can I do that??
B
4
Posts: 33
Reputation: 266

Post » Sun Jul 19, 2015 11:07 am

array You want to push back cell0 on x axis
array set value at (array.width-1,1) to var1
array set value at (array.width-1,2) to var 2

important
Array width is 0 and height is number vars you adding.
In this case 1 (0,1)

So it stores it
0 | cell0,var1,var2
1 | cell1,var1,var2
etc

To retrieve you need the x
to get 0 data
array.at(0) = cell0
array.at(0,1) = var1
array.at(0,2) = var2
etc
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Sun Jul 19, 2015 4:45 pm

Oh duh! thats what I did with the other thing i was doing. thanks.
B
4
Posts: 33
Reputation: 266


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], chrisyamao and 1 guest