How Do I Create a Simple Text Editor Inside A Game?

Get help using Construct 2

Post » Thu Sep 29, 2016 8:11 pm

I can't really figure it out. Eg. I want tp be able to create a simple text file inside a game by right clicking into game window and just pressing on "Create Text File" or something like that.. and be able to save it in the game. Just like it's done in Windows.. My game is some sort of reconstruction of Windows, well, it's not that much of a game.

Thanks in advance.
Belief.
B
22
S
4
G
4
Posts: 159
Reputation: 3,276

Post » Thu Sep 29, 2016 8:43 pm

The textbox object can be used for your text editor. After that you can get the text with the Textbox.text expression. You can put that in a global variable or anywhere you'd like to put it so you can access it later. If you want to save from one run of the game to the next look at the local storage plugin.
B
100
S
38
G
134
Posts: 5,556
Reputation: 85,325

Post » Thu Sep 29, 2016 8:47 pm

Would I be able to make multiple text files with just one global variable?
Belief.
B
22
S
4
G
4
Posts: 159
Reputation: 3,276

Post » Thu Sep 29, 2016 9:49 pm

You could utilizing some character you aren't using in the text and the tokenat() expression. However it's easier to just make another global variable. You could also use an array or dictionary.
B
100
S
38
G
134
Posts: 5,556
Reputation: 85,325


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], Hmj19 and 4 guests