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

0 favourites
  • 3 posts
From the Asset Store
The Suki Sprite Sheet features a fierce green goblin warrior wielding dual axes.
  • ....

    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??

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh duh! thats what I did with the other thing i was doing. thanks.

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