playMaker

Author Topic: Write to txt file.  (Read 2705 times)

Aaddiction

  • Full Member
  • ***
  • Posts: 166
Write to txt file.
« on: April 27, 2015, 05:43:38 PM »
Hello,

Is there a way to change the text in .txt file during runtime with pm?

Thanks.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Write to txt file.
« Reply #1 on: April 28, 2015, 05:47:09 AM »
If you check Ecosystem there is a "Write to file" action that writes a string to a text file
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Aaddiction

  • Full Member
  • ***
  • Posts: 166
Re: Write to txt file.
« Reply #2 on: April 28, 2015, 12:33:35 PM »
If you check Ecosystem there is a "Write to file" action that writes a string to a text file

Great, this seem to work with path set to C:\asd.txt.
Can I please ask what file path to put for use on mobile device? Only the name: asd.txt?

Thank you.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Write to txt file.
« Reply #3 on: April 29, 2015, 01:24:21 PM »
hi,

Maybe, depending on what you need to achieve, playerprefQ (search in forum for it) could be a solution. It saves data like playerpref (key + data) into .txt file. You can save strings into the file.. so edit string during runtime then save it to file with key. It also saves string arrays..

stigma

  • Full Member
  • ***
  • Posts: 176
Re: Write to txt file.
« Reply #4 on: August 05, 2023, 11:01:11 AM »
Thanks, it works great. I did not know Ecosystem.
I would like to insert a line break otherwise the data is on a single line. How do we do?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Write to txt file.
« Reply #5 on: August 06, 2023, 01:46:42 PM »
Hi.
You can use String Add New Line and Build string