• 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.

[JASS] File Reader

Status
Not open for further replies.
Level 8
Joined
Oct 8, 2005
Messages
409
I need a JASS Trigger that will read an imported text document, starting with the first record, assign that record to a string, text message that string to all players, and then move on to the next record, I want this loop to continue until it has text messaged all of the records in the text document with a 5 second delay between each message

I then also need a trigger that does the same thing, but with fields

Is this possible and how would I do it ?
 
Level 8
Joined
Oct 8, 2005
Messages
409
why cant I just add a new mpq file to keep all of the strings in ?

this map has no other purpose than to read text to people, but I don’t want to have to write 5,000 text message triggers, I would rather just insert all of the text into a file for it to read
 
Level 5
Joined
May 22, 2006
Messages
150
Ah, do not forget: JASS is a script language.
Many things you can do with a real language like C++ are not possible with JASS.
FileReader is a class of Java... Using it with an InputStreamReader allows you to read text out of files... But this is not Java - and so maybe there is a "have to".

That is the charme of script languages - try to do something without having the right tools to do it.

There may be ways to do it:
First, try what happens if you simply rename your textfile without changing the format.
Does it work? Good. Does it do not? Well... That means hard work.
But hey - I do not know what you need a map for, which just displays seventy pages of text to the player, but if it is not just something stupid, I guess, it will be worth the work.
... Or it may not be important enough for that... But is it important anyway then?
 
Status
Not open for further replies.
Top