How do I get NW.js write file to work?

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I tried:

    Write file: file "test.txt", contents "abc"

    and exported the project.

    I would expect the file "test.txt" to appear in the exported program's directory, but it doesn't. What's wrong? A working example would also do the job.

  • I was about to open a thread to ask the same, as I haven't find the answer after many and many searches.

    I basically can't make the actions to work at all, even if I set

    Start of layout -> NWjs -> set clipboard text to "test"

    Nothing happens, the clipboard still have whatever it had at than moment.

    My goal is, as mindfaQ 's, to be able to write an external file. I also think a working file would be enough for me (I hope).

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, part of the solution to this... if I export the project with NW.js then it works... but if I export it to HTML5 it doesn't (I've tried directly from the folder on my desktop or uploading to my public dropbox folder).

    Is there a way to write external files in HTML5? Maybe not using NW.js, but other method?

  • I also want to write a plain text file. I need that the project can continuously store new data. I created a kind of database with a TXT file. Since not exist in Construct2 some that can be manipulated such as a MySQL database. But I don't know writing in my text file "data.txt"...

  • OK, part of the solution to this... if I export the project with NW.js then it works... but if I export it to HTML5 it doesn't (I've tried directly from the folder on my desktop or uploading to my public dropbox folder).

    Is there a way to write external files in HTML5? Maybe not using NW.js, but other method?

    Conditions and actions of NW.JS work only if you preview with NW.js and/or export as NW.JS.

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