Filling a 1D Array With an Incremented Variable

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi, all.

    I read what I could find on arrays on the official Construct 2 threads and I still can't figure out why my capx doesn't work. The array doesn't even show in the debugger.

    The simpler ones do, when filled manually with lists.

    I'm trying to fill a 1D array with this list of 96 values:

    20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800 820 840 860 880 900 920 940 960 980 1000 1020 1040 1060 1080 1100 1120 1140 1160 1180 1200 1220 1240 1260 1280 1300 1320 1340 1360 1380 1400 1420 1440 1460 1480 1500 1520 1540 1560 1580 1600 1620 1640 1660 1680 1700 1720 1740 1760 1780 1800 1820 1840 1860 1880 1900 1920

    Is current supposed to be in there somewhere?

    This is my first attempt to use an array.

    http://www.darksunpictures.com/public/array.capx

  • Your code is working. The debugger shows the array with 96 values, as in your list.

  • Really? Maybe I'm doing something wrong. Why the heck would I not see it in the debugger? Screenshot maybe?

    Thank you for replying btw.

    On an unrelated note, how would I pick 4 random non-repeated values out of that list? (NVM, just figured this out! )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nvm, now it shows up in debugger, maybe it was some crazy run time error.

    Err, now that I think about it, maybe I didn't know I was supposed to click on the array name on the left and maybe I just didn't notice it.

    First time using the debugger too (and everything else showed on the main screen which is I think where I was looking for it).

    Thanks very much for checking!

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