Can I retrieve text from an external file?

Get help using Construct 2

Post » Thu May 03, 2012 2:07 am

So here's what I'm trying to do...

I'd like to be able to retrieve the text from an external .txt file. I'd like to be able to use this for things like Dialogue Trees and Array Data. I know that Arrays can save and load from JSON strings, but I'd like to be able to edit the JSON string manually and then be able to save it/load it.

Or, does someone know an efficient way to be able to edit Array data outside of having to use events within Construct 2? I don't want to have to build an entire level editor just to have a way to edit my array information, any ideas?
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Thu May 03, 2012 3:07 am

.csv? or xml?
B
22
S
9
G
3
Posts: 202
Reputation: 3,645

Post » Thu May 03, 2012 5:41 am

I'm afraid I have no idea about either of those formats, I was hoping to simply be able to reference a .txt (notepad) file, tell construct which lines to look for within the text file, and then return everything between those lines as a string.

The application for this then being to store things like character dialogue, array data for level building, enemy lists/stats, and so on and so forth? I'd be all for writing a plugin to do it, except that I don't know javascript, or any programming languages at all really, except for some basic VB.

Any ideas?
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Thu May 03, 2012 7:01 am

Well, if you want to parse it yourself instead of using JSON or XML, just AJAX request a text file.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Thu May 03, 2012 7:06 am

It's not that I want to, I just know NOTHING about using either of those file types :S, but thanks for the AJAX idea, I hadn't thought of that at all
B
64
S
8
G
9
Posts: 290
Reputation: 8,590


Return to How do I....?

Who is online

Users browsing this forum: WhosWho, Yahoo [Bot] and 16 guests