• 🏆 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!

[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