jobel's Forum Posts

  • Eren YOU are a life saver my friend!

    thank you!

  • oosyrag

    thanks for the offer, but that's not the point.. I can convert the csv to a json.. that's an extra step and I can't reference the field name in the array.

    Someone just posted on Rex's CSV that they updated it to c3 I think.. so that may be the best option..

  • but also you can't resort your columns without having to change all your constant variables.

    I would like it to be how Dictionaries are.. except Dictionaries can only store 1 field for some reason...

    but notice how Dictionaries store their info... up and down! not left to right...

  • but you see how a Dictionary stores the info? Downward. That's how I use my arrays and tables.

    why aren't Dictionaries stored left to right like arrays?

    of course technically it doesn't make any difference, except if you are like me and you are in your tables all the time editing them and you have 500 hundred entries and are scrolling all the way to the right instead of up/down. :(

    in my game I have 30-40 tech items that the player can research during a game. I have the first column be the research unique ID (which I also just use as the X) and all the other columns are data about that research item, even which frame number to show on the UI. Also some fields get modified, like if it was already unlocked or researched. I have about 20 fields for the one item.

    it's like if I told you: all the dialogue in your game that you have in Google Docs, you need to transpose that so it reads left to right for Construct.

    it's why I never used arrays much and always used CSV plus being able to type the field name in quotes in one line was nice, opposed to having to make a bunch of constants and then have to make sure you don't resort your rows!

  • transpose them and just have ugly tables :(

  • do you know if it's possible to add multiple columns to a DataDict?? That would solve my problems!

  • AllanR yes there are constants in C3 and C2.. I use them all the time! It's a checkbox when you create the global.

    when I make tables in excel/google sheets I've always have my entire "record" on 1 row, each field is a column.

    so when I do - For Each X (in the array) it is looping through columns, not rows!

    it's just completely upside down to me! Maybe it's cultural?? I used to be a database guy back in the day, so maybe I'm just bias... I use LOTS of tables in my games.

  • I can work around it, but that stinks. I have at least 6 large tables I use in my game.. Say I add an entry and reload the table into Construct, now I have to dig through code to set my variable to loop the correct amount of times every time I mod the table... that's heavy maintenance and begging to become a bug the one time I forget to mod the code.

    I guess I'm just trying to make a case for CSV plugin to come to C3.

  • If you load your array this way it thinks I only have 4 entries, not 500

    i.e. you do a For Each X event and want to loop through the whole array, you can't

    It's why I started to use Rex's CSV plugin back in 2013 and have continued to use it.. now in C3 it doesn't exist... I have MANY tables I use in excel that I bring into my game, reference and modify... (like a database)

  • oosyragyes I have a paid version and I use the Array editor.. but it's backwards..

    my rows are the entire "record" or entry" and my columns are the "fields"

    so for example I have a 500 entry table of random names for my planets. In a given game there are only 20-30 planets.. but I hit the table randomly for a name. In excel this table has 500 rows and 4 columns that I use for other data based on that planet name.

    This makes sense to me, but in Construct I would have to make my table have 500 columns with 4 rows.. no thanks!

  • can't figure out how to format the text!! why is this forum's features SO BAD!!??

  • Why is there NO link for the forums on the main site? I have to dig to find the link to the forums. It's always difficult for my students to find the forums..

  • I can't figure out how to post code or fixed width text examples... there should be a 'help' section on how to deal with markdown text.

    Every time I hit [ENTER]

    it adds a line in between... extremely annoying!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been programming since 1995 and we load arrays like this:

    const int NAME=0, GAMES_PLAYED=1,UNLOCKED_BOSS=2;

    Array[0][NAME] = "Andrew";

    Array[0][GAMES_PLAYED] = 42;

    Array[0][UNLOCKED_BOSS] = "yes";

    Array[1][NAME] = "John";

    Array[1][GAMES_PLAYED] = 11;

    Array[1][UNLOCKED_BOSS] = "no";

    Array[2][NAME] = "Fred";

    Array[2][GAMES_PLAYED] = 2;

    Array[2][UNLOCKED_BOSS] = "no";

    The excel spreadsheet would look like this:

    ID NAME GP UNLOCK

    ------------------------------

    0 Andrew 42 yes

    1 John 11 no

    2 Fred 2 no

    If you know anything about arrays in construct it swaps rows with columns. WHY??? It's incredibly confusing!

  • I assume the answer is no?