- Joined
- Jan 26, 2014
- Messages
- 1,281
- Reaction score
- 106
- First Language
- Irish
- Primarily Uses
- N/A
So I made a text file with this as a content:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.and used this script to make it work on RPGVXAce:
File.open("loremipsum.txt", "r") do |f| f.each_line do |line| puts line endendI stored a txt file called loremipsum on the game folder.
Now this is my question:
I have three attribute accessors called:
string1
string2
string3
Now. I want to detect which line I am reading on the text file, so I can do something like:
string1 = "Lorem ipsum dolor sit amet, consectetur adipiscing elit,"
string2 = "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
string3 = "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
So, I am in hopes for anyone to answer how I can detect the file lines so I can equate it with any variable, or even hp and mp.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.and used this script to make it work on RPGVXAce:
File.open("loremipsum.txt", "r") do |f| f.each_line do |line| puts line endendI stored a txt file called loremipsum on the game folder.
Now this is my question:
I have three attribute accessors called:
string1
string2
string3
Now. I want to detect which line I am reading on the text file, so I can do something like:
string1 = "Lorem ipsum dolor sit amet, consectetur adipiscing elit,"
string2 = "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
string3 = "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
So, I am in hopes for anyone to answer how I can detect the file lines so I can equate it with any variable, or even hp and mp.

