[PLUGIN] CSV, CSV2Array, CSV2Dictionary

From the Asset Store
I18N - Translation plugin
$7.20 USD
10% off
The I18N (Translation) is a Construct plugin created to translate text in game.
  • ffman22

    You might ask at "How do I" section to get help about using AJAX.

  • ffman22

    Capx

  • ffman22

    Capx

    thank you soo much for the example rexrainbow

  • https://www.dropbox.com/s/qg2vwbwk6sgpw ... uTest.capx

    Hello, I am currently having trouble with these loops. I am making a menu and I want to create a sprite for each time a value in Col "AVIABLE" is "True". In my example there are four instances that are true and if I understand

    (For Each Row) & (Data "True" in Col "AVIABLE") should only create four instances of "Sprite2" and pick for each "Family1" where CSV.At("AVIABLE",CurRow) and pin them to each block of "Sprite2" as it is made.

    If I simply have For Each Row it will spawn 5 "Sprite2" so I know it is a matter of not knowing how to filter the CSV's data. Finally form my trial and error I know that I need another condition so I am selecting each "Sprite2" individually as if I remove the Data "True" in Col "AVIABLE" It will put all the Family1 instances on the last block of "Sprite2"

  • CrazyVulcan

    You might try system condition "compare two values" , get the cell value by expression: CSV.At("AVIABLE", CSV.CurRow) for 1st value, "True" for 2nd value, to filter the result.

  • You might try system condition "compare two values" , get the cell value by expression: CSV.At("AVIABLE", CSV.CurRow) for 1st value, "True" for 2nd value, to filter the result.

    It worked, found the problem was I was calling Col "AVIABLE" but if you look carefully you will see that when I loaded the CSV string that column was called "AVILABLE" I fixed the typo and I can move ahead.

    Thank you.

  • Hello,

    I am trying to load a csv file into an array, but I am strugling to get it to work.

    Could you take a look into my capx?

    Thanks in advance

  • ikke2902

    The items had been loaded into array object, you might open the preview in debug mode.

  • rexrainbow

    Thanks for taking your time

    The items has been loaded into the array, but I can't retrieve the correct value from it.

    When I pick valeu at array(1,0), I'll get all value on row X=1.

    However, I just want a single value at array(1,0). When I try other coordinatates, let's say (1,1). I'll only get value zero.

    How can this be solved?

    Here is another capx with some comments

  • ikke2902

    The delimiter is "," , so the csv string should be

    ,P1,P2,P3
    Length,1.2,1.6,1.7
    Skill,1,5,3
    Gender,m,m,f[/code:po3jxcpu]
    
    BTW, you might use csv plugin for this csv format.
  • Ahh, so I lose the delimiter after I have edited my csv file using libre office. I use notepad to do small edits now and the delimter isn't dissapearing anymore.

    Also thank you for pointing me to the right direction. I am using your csv plugin now. Cheers!

  • Link to examples on page 1 are broken

  • justifun

    I had updated all documents of these csv related plugins. See the first post of this thread.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow I have a request... can you add mapping "Page to z" as in "row to x" and "col to y" if it is not too much trouble for you..

    [attachment=0:1vpgtwb9][/attachment:1vpgtwb9]

    You might misunderstood my request so to clarify, it would be very helpful if I can just put CSV in the data entry and the magic will put loaded csv pages into single array so that i have a working single 3d array instead of a lot of array in 2d. Or is there a better way to put the csv into 3d array? Or maybe the ability to refer to the x,y,z by index?

    I'm sorry my question might confuse you as im not a code-savvy person..

  • DuckfaceNinja

    Good idea!

    I had added another action which could put the csv into the specific z index. See the latest sample capx in document.

    The older action had been deprecated.

    You still need to have a loop to load csv tables into each z index, since one csv table is only a 2d table.

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