CSV

  • Hi nice people of C2! Need a little help, please.

    I'm using a CSV table like this:

            ?JPG,             TXT            ,KIND,     

    cat,       cat.jpg,      cat.txt,          cute,

    puppy, puppy.jpg,      puppy.txt,     cute,

    shark,   shark.jpg,      shark.txt,       nasty?

    With this I can nicely generate a list with a text box and picture for each animal, using ?for each row?. But what condition and how should I use it to generate a list with only the ?cute? animals. Thank you!

  • Had a similar question a while back. Give this post a read and see if it helps.

    http://www.scirra.com/forum/arrays-problems-getting-value-with-randomization_topic84647.html?KW=

  • Thanks. Yes, it seems to do the right thing but, still, don't really get it. What does "populate" actually do in your example. And where does it pick up the "1" value parse the array with ? Sorry I'm fuzzy with arrays. This is why I prefer CSV tables which I can also edit easily.

    I guess i don't know where can edit the "function". Can you elaborate please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, sorry.

    What you basically want to do is create an array with your CSV file. There is an expression called TokenAt that will parse the CSV and put each item in an array block.

    I think the first step would be to really understand arrays as that is going to be your best bet for storing and sorting the information.

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