How do I "set text" from an outside file?

Get help using Construct 2

Post » Fri Jul 03, 2015 3:24 pm

Lets say I have a standard Notepad text file called "GameScript.txt", which contains the script for the game (what characters say etc), is there anyway I can reference that text file in the "set text" event?

For example:

Let's say I have a character called Jane and I want her to say "Jane: Whoopie, I love fish in the morning after wine." In my "GameScript.txt" file, I have the line "Jane: Whoopie, I love fish in the morning after wine." on row 6 of the document, is there any way I can reference that line instead of typing out the line into the text box manually?

It would make making changes to the script far easier, and it would allow me to easily translate the game, pointing the game to the translated "GameScript_French.txt" file, instead of manually changing the set text's to french.

I hope that makes sense? If not, just respond and I'll try to make it more clear.

Thanks for any help guys!
B
5
S
1
Posts: 16
Reputation: 432

Post » Fri Jul 03, 2015 3:29 pm

Hi, I don't experiment a lot with external files but I made a trivia game once, what I used was rex-rainbow plugin CSV, or CSV-to-array (not very sure) and had all the text (obviously) in a CSV file which you can easily edit in EXCEL.
Image
B
57
S
13
G
6
Posts: 271
Reputation: 12,103

Post » Fri Jul 03, 2015 4:02 pm

Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Fri Jul 03, 2015 8:53 pm

Hey danuyos and korbaach, thanks for responding!

I really appreciate the link you gave me korbaach! This is what I've been looking for! Thank you for taking the time!
B
5
S
1
Posts: 16
Reputation: 432


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983 and 13 guests