read and write text or csv files

Get help using Construct 2

Post » Wed Mar 06, 2013 9:43 pm

Hi,
I'm new to C2 and usually use these kind of programs (used to use MMF2) to make small / simple games just for fun to see what I can do.

I'm looking at creating something in C2 which can read a pre-made text or csv file. I'd then like it to add some values to this / edit the values and then export as a new text / csv.

For example the file might start with text "1, 100, 100" meaning ID 1, x co ord 100, y co ord 100. I'd like it then to add 50 to the X co ord and hence save a new text file as "1, 150, 100".
I started making a simple spread sheet in excel for this but I'm actually using one point (Point ID, X, Y, Z data) and creating 16 points from this.

I would like to do this for around 50 points automatically hence excel would mean I'd have to cut and paste into and out of the spread sheet. I was hoping I could make something in C2 that I could set this up in?

Any help would be appreciated. I've had a search through the array tutorial but not really managed to get any thing working.
Cheers
B
32
S
9
Posts: 156
Reputation: 3,521

Post » Thu Mar 07, 2013 1:12 am

I think Construct may not be the tool you are looking for to create this application.

There is http://www.scirra.com/forum/plugin-csv-csv2array_topic46096.html
for importing of csv, but I am unfamiliar with Construct's file output capabilities so I'm not sure.
Mistakes were made.
B
37
S
17
G
67
Posts: 1,041
Reputation: 38,211

Post » Thu Mar 07, 2013 2:13 am

Does this plug in help?
Rex CSV plug in
B
34
S
4
G
8
Posts: 67
Reputation: 5,857

Post » Fri Mar 08, 2013 5:22 pm

Thanks for the replies. It appears C2 is not suited to what I am after. The CSV plugin mentioned I've been told can only read files, it cannot write to files. I guess I'll have to stick with Excel with VB or something.
B
32
S
9
Posts: 156
Reputation: 3,521

Post » Fri Mar 08, 2013 5:39 pm

You might to check these plugins before switching back to Excel !

FileSaver
FileReaderMagistross2013-03-08 17:40:08
B
45
S
16
G
18
Posts: 845
Reputation: 13,673

Post » Sat Mar 09, 2013 1:48 am

You can save to webstorage with the CSV plug-in.

After changing the data in this table, you may want save it into webstorage.
Expression: CSV.TableToString
B
34
S
4
G
8
Posts: 67
Reputation: 5,857


Return to How do I....?

Who is online

Users browsing this forum: Eisenhans, michaelverdi and 20 guests