How do I set values FROM first array to the second array

0 favourites
  • 5 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • Hello Folks:

    I've been working on this for an hour - granted my little tots have been running rampant around the house, interrupting my thoughts. :-)

    This should be simple enough but I can't figure it out. I am a little embarrassed that I can't figure this out.

    I want the values in one array to be equal to the values in another array. The idea here is that I have an array that is the MASTER and then one I can manipulate without ruining the master.

    Please see my image of my screenshots. Thanks so much for any guidance.

    I know the # of elements in the _InPlay is 20 elements; that was just my troubleshooting.

  • Clarification: Image D is the result of when I try to use the .at(i) from Image A.

    When I use the action in Image B, the In Play array has 1 in all elements (again that was my test to see if I had issues with running the lines to begin with)

  • You confirm that the master array has data but the question is when does it have data? The values could be 0 in master when you are running that loop so it is copying 0 over to the other array. If image B works and adds 1 to your array which I expect it would then the issue is that the values in master array are 0 at the time you add them in image A.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I bow to you. You are correct.

    Makes total sense.

    I had my AJAX pulling the data in a different event sheet and the process did not finish before I tested the game layout. My event for the arrays was kicked off by START OF LAYOUT. I now use a button that is more practical.

    I will not much such a mistake again.

    Thank you, Plinkie.

  • Great! Glad it's resolved.

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