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.
Burry me with my empty hands sticking out the ground, so that all can see, that the one who had the world on his hands, died with them empty.
B
19
S
4
G
4
Posts: 133
Reputation: 3,068

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
91
S
31
G
102
Posts: 5,232
Reputation: 67,250

Post » Thu Sep 29, 2016 8:47 pm

Would I be able to make multiple text files with just one global variable?
Burry me with my empty hands sticking out the ground, so that all can see, that the one who had the world on his hands, died with them empty.
B
19
S
4
G
4
Posts: 133
Reputation: 3,068

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
91
S
31
G
102
Posts: 5,232
Reputation: 67,250


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], ksiads, marc254, marcinkowski, mtnboy22, Rable and 5 guests