How do I get text from a txt file?

0 favourites
From the Asset Store
Change delay, create new lines, "backspace" the text
  • It looks like you are running Construct in Chrome browser. You need to use the Desktop App:

    https://www.construct.net/en/forum/construct-3/general-discussion-7/construct-nw-js-desktop-app-131317

    NWJS actions will not work in a browser.

    SOLVED!

    Thank you so much dop2000 - I honestly thought I had Construct's desktop app installed on my computer (it shows up as an app), but I didn't know that there was a specific NWjs version for this sort of thing.

    Thanks guys! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In fact, it could be a real progress if Ajax loading of Project files do not use mandatory names.

    For exemple, you have multiple levels named "level1", level2", etc. in your project files.

    The user click a level number, for ex. 25.

    So variable is 25.

    With mandatory project files names, impossible to load "level25" in a simple way.

    With free project file names, you could load "level"&variable.

    Maybe that could be implemented ?

    And, in some dreams, uou could even SAVE, inside of the app, project files.

    You create a level in your editor, the 36th, variable 36, and save it as project file "level"&variable.

    Could be great for seigning efficient level editors...

  • With free project file names, you could load "level"&variable.

    This is possible. Instead of Request Project File use Request URL. In URL field put "level"&variable&".json"

  • Thanks ! It works pretty well. I should have tried that... But I always found the documentation of Construct short on many points :)

    Is it then possible to save a file as a project file using the same way ?

    I will try !

    Thanks again

  • No, unfortunately it's not possible to save or rewrire files in the project.

  • ok, but how do you write files at least on your own computer ? (if you're not in nwjs)

    Local storage ? ok, but where are these files in fact ?

    Ajax ?

    I'm surprised that these kinds of functions are not implemented, not for the final user (dangerous), but at least for the developper.

    Many thanks for your help

  • It's not possible to write files from a browser game due to security restrictions. You can only invoke download a file using Browser plugin.

  • You would use a server. Ajax if you want to make your own solution or service such as Firebase. There are several examples, and tuts floating around.

  • I know. But it has no sense in a developping tool as construct, if you implement this save for the developper, not the final user.

    In construct 2, preview was possible with nwjs. Or the browser of your choice.

    I think that many things were lost with construct 3...

    I will do another way :)

    Many thanks anyway for your excellent and quick posts !

  • Sure. but the first goal of Construct was to make things simple. And it does with construct 2.

    The 3 has forgotten that way. Every implements are now geek ones, and the essential is still forgotten.

  • In construct 2, preview was possible with nwjs.

    In C3 preview with nwjs is also possible, you need to install the Desktop app:

    construct.net/en/forum/construct-3/general-discussion-7/construct-nw-js-desktop-app-131317

  • Thanks, but it doesn't work in preview mode.

    Works only if you export and create your nwjs app.

    Different from Construct2.

    Thanks again

  • Sorry, I looked your post too quick ! :)

    I installed C3 as a desktop nwjs app using your link, and everything works.

    A thousand thanks this time !

    (but, is it normal to find that sealed in a forum ???)

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