• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Import] Read/Write Text Files

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,220
I cover how to create text files in one of my tutorials.

How can I create .txt files via triggers?


Those of you who ask this have most likely seen it in a RPG who store their load codes like that, I got good news on this point.

I can tell that I got a script that i blind donkey could use :)P)

  • easy preload
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set path = C:\random\
      • Custom script: call PreloadGenStart()
      • Game - Preload -load KEUg-YaNc-rDDq-wQ54-9Zyr-7Wm2-mp5W-YaS2-77HP-4Cg3-aZbP-PxZp-SQs2-hsd-asdasdasda-sdasdasdas-dasdasdas-dasdasdasd-asdasdasd-asdasdasd-asdasdasd-asdasdasd-asdasdasdas-dasdasda-dasdasdas-dasdasda-sdasdasd
      • Custom script: call PreloadGenEnd(udg_path +"test.txt")
so here you just set the path where you want to store the txt file I used c:\random\ is this case. not that if the folder "random" doesn't exist it creates one automaticly.
then it loads whatever you want and saves it as test.txt

if you want a better one I suggest heading over to the "file I/O @spell section"
 
Status
Not open for further replies.
Top