• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Import] Read/Write Text Files

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
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