How do I store strings or text

Get help using Construct 2

Post » Thu Mar 15, 2018 9:37 pm

For example i need a dialogue system and i have 1000 lines that the characters must say. Where do i store the text? I can't find, surprisingly, anything on this( searched google) , and using on start of layour set array at x to "text" just seems off. How would i store strings and text i already know from the beginning ( so introduced while in the editor) ?
B
8
S
1
Posts: 60
Reputation: 701

Post » Thu Mar 15, 2018 11:57 pm

Create a text file and import it to your project.
Use AJAX to request this file and then parse the text with tokenat, tokencount expressions (with newline as separator).
There are plenty of examples here.

Or you can use CSV plugin:
viewtopic.php?t=64326&start=0

Or built-in XML plugin.
Here is a dialog system where lines are loaded from XML:
zelda-dialogue-system-capx-and-demo-included_t182559
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
157
Posts: 2,212
Reputation: 83,505


Return to How do I....?

Who is online

Users browsing this forum: LaurenceBedford and 5 guests