How do I Call A Text Document?

Get help using Construct 2

Post » Thu Oct 13, 2016 4:47 am

Hi, I am building an application that will contain a lot of text. Is there a way on Construct 2 to call the text from a text document like Notepad instead of adding the Text Object each time I need to add some text?

Thank you!
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Thu Oct 13, 2016 8:17 am

Import your text file as a project file. https://www.scirra.com/manual/141/files

You can access it via the AJAX object (https://www.scirra.com/manual/107/ajax) and use the tokenat() expression to parse out your text. newline often serves well as a token separator.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,616
Reputation: 61,653

Post » Thu Oct 13, 2016 1:10 pm

Thank you, oosyrag!!!!! I was able to achieve what I needed. I really appreciate it!!!!

:)
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Thu Oct 13, 2016 5:50 pm

oosyrag wrote:Import your text file as a project file. https://www.scirra.com/manual/141/files

You can access it via the AJAX object (https://www.scirra.com/manual/107/ajax) and use the tokenat() expression to parse out your text. newline often serves well as a token separator.



Thank you!
B
19
S
4
G
2
Posts: 97
Reputation: 2,244


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 33 guests