Saving and Loading multiple Text files

0 favourites
  • 3 posts
From the Asset Store
Human/Character Base Pixel Art Sprites in various poses (nearly 100 files)
  • Hi folks!

    After crawling through forums posts and multiple searches without success, I've finally decided to simply ask the community for help instead.

    As the thread subject states, I'm trying to save and load multiple text files (not all at the same time, however) but it's a task I've not been able to conquer ... yet.

    Why do I need to save a load multiple text files? I intend to create a program for language practice that will use text files exported from other programs such as Pleco and Anki or the user's own custom dictionary.

    I think what I need to achieve this is the Node-Webkit but after trying it out, I can't even get it to save a text file.

    I tried creating a text file named, "Test1.txt" containing the text, "test" but a hard drive search for the file returns 0 results.

          System - On start of layout

          NodeWebkit - Write "test" to file NodeWebkit.UserFolder&"Test1.txt"

    Thanks for taking the time to read this!

  • Sorry for the double post but I figured it would be better double post than start a new thread since this was pushed back to the third page.

    After further experimentation, I've managed to load a text file with the AJAX plugin. This, however, requires the text file to be imported into the project files and doesn't allow for the creation of additional text files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm making a very simple level editor for a tile based puzzle game which can save & load text files to & from an array. The same thing would work with the Dictionary object too.

    To save, I use this action on the array:

    Download as JSON data with filename TextBox.Text & ".txt"

    (TextBox is the object I use to type in the filename for saving)

    Loading uses the FileReader plugin, which might not be ideal for your program since it uses an uncustomizable web button & can't be called with actions - you have to click on the button then browse to your text file. This is fine for a scrappy level editor though.

    So, the loading process is:

    FileReader > on file loaded > Array > load from JSON string FileReader.fileContent

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