[PLUGIN] CSV, CSV2Array, CSV2Dictionary

From the Asset Store
[C2] [C3] support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • Yeah, that's how i did it in one older prototype for showing items in inventory console style.

  • Hey Rex, how can I check what entry is at particular position on table so I can have a conditional event? For example : if at col Gun and at row Bullet entry is even/uneven to 10 then do/not do something?

    Also I can't remember what ENTRY IS VALID and KEY IN COL/ROW is for? ><''


  • megatronx

    "condition: ENTRY IS VALID" could check if the target row,col is valid. For example , if the (col, row) = (Gun, Bullet) is not in the table, it will return false.

    "condition:KEY IN COL/ condition:ROW" is similar with "condition: ENTRY IS VALID". For example , if "Gun" is in col , it will return true.

    condition: ENTRY (Gun, Bullet) IS VALID = (condition:KEY "Gun" IN COL) and (condition:KEY "Bullet" IN ROW)

  • Ok thanks. But there is no way to check for value of entry is it?

  • megatronx

    Do you mean that you want to get (col, row) key from entry value?

    For example,

    (Gun, Bullet) = 10

    Get key from value

    10 -> (Gun, Bullet)
  • Yeah, basically if (Gun, Bullet) = 10 then do ( or don't do ) actions. And ideally if it would work like this (IndexCurCol, IndexRowCol) = 10 so if I'm using a loop I could determine which entries should be skipped or replaced.

  • megatronx

    It seems that you use "condition:for each col", "condition:for each row". You could use "expression:CurValue" to get the entry value at (CurCol, CurRow).

    Then use system condition to compare the CurValue with the target value.

  • Ok, I'll try that. Thanks.

  • Hey rex! I was wondering if you still have the "AJAX to CSV.capx" file that you shared with someone else? I am having issues working with AJAX to load my CSV string and I am betting that CAPX file would answer a whole ton of questions I have...

    Also, is either CSV or CSV2ARRAY able to do a true export?I am hoping to get a file that I can quickly identify and make offline edits and then load back in...


  • goblynn93

    "CSV" is just a string. You could make sure the AJAX had received data (string) successfully first. See the offical manual for more detail.

  • I did... The manual to me is mostly useless. I can't translate the high level vague overview of the manual into anything practical. I need examples and working code to look at to understand why it works.

    The manual assumes a certain level of pre-understanding and I don't have it. I am smart enough to figure out how stuff works if I see it in action and I can even adapt things I've seen working and use bits and parts to make new things...

    but I am not good enough or smart enough to read the manual and take off running. This is definitely way outside my comfort zone and you'd probably laugh at my project and how long its taken me to get to the point I am at! Months... literally... and all I am doing is displaying some random text on a screen...

    Thanks for the response though... like every other road block I've hit in Construct 2 the answer is probably a lot more simple than my brain is making it. The answer is probably right in front of my face and I can't see it because I am over complicating this.

  • goblynn93

    Capx: AJAX -> CSV

    Moreover, you might post a request for an AJAX built-in example since you (and many users) really need this.

  • I'll make that request before I even download your capx :) Thanks again, I really do get a lot more from the tutorials and built in examples and sample capx files than I do from the manual! Its the community support that C2 enjoys that makes it what it is!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How can I "for each row" of different csv pages?

  • przemcio

    Using "action:Turn page" to change current page, then using "condition:for each row"

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