0 Favourites

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

  • ....

    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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff
Unread hot topic
78 10,772
Josek5494's avatar
Josek5494
Unread hot topic
56 4,728
MPPlantOfficial's avatar
MPPlantOfficial