Last night I experimented with using text files with Construct 3. Actual the Youtube tutorial I watched you can find here:
youtube.com/watch
which is made by James Q Quick. It is a very good tutorial. This tutorial is about reading records of scores into an array and extract the individual score.
In the tutorial, the AJAX object is used. You also need a text file named "TextData.txt" in the following format:
John;
10;
#
Betty;
20;
#
Kate;
30;
#
Where the ";" separate the fields inside the record and the "#" marks the end of the record. However, you can use any character as long as they are not present inside your text.
You also need to place a "Text" object onto your layout and name it "FeedBackText". Also, an Array with the name "ScoresArray" with a width of 10 and a height of 2 is needed. Here is a screen capture of the event sheet containing the necessary events:
In the map "Object Types" you find all necessary objects you have to add. The last event is just a tryout of mine to use JavaScript to end my experimentation.
When I watch the ScoresArray Inspector when I debug, this is exactly what I need to create and use the timeline for my interactive story. What I observed when making changes to the imported textfile is, that it is not automatically updated when something change and is saved. Also, make sure the imported file is in text format (extension .txt) otherwise you get a lot of unnecessary information which makes a mess of your file.
Question: Is there any way I can reflect the saved modifications automatically inside the "Text" file? Thank you for your help in advance.
I am surprised how easy it is to learn Construct 3 and its event system. However, I have still a very long way to go and it will not remain that easy I am sure.
I share my experiences here in case somebody has the same problem and doesn't know where to start. I do appreciate the very helpful replies.
Chris