How do I get my game to save names?

Get help using Construct 2

Post » Mon Apr 10, 2017 8:10 pm

oosyrag wrote:Event action:
System - Set variable to TextBox.Text
Mistakes were made.
B
49
S
24
G
107
Posts: 1,579
Reputation: 60,299

Post » Mon Apr 10, 2017 8:37 pm

Message: MKP1000 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
oosyrag wrote:The Global Text name should just be NameVariable.

& is used to put strings and expressions together (for when you need to display it later).

Edit: quick example - https://www.dropbox.com/s/ixxhux3nofbsb ... .capx?dl=0



OK so I have a problem. I'm trying to make it so that when you press the OK button, it saves the name and goes to the next screen at the same time.

I have:
Global Text as Name Variable
Button- On clicked- Set name Variable to textbox.text
Button- On clicked
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 1:41 am

oosyrag wrote:
oosyrag wrote:Event action:
System - Set variable to TextBox.Text


Update: So I tried to get it to save the name and I don't think it worked. I have it set to:

Global text: name
Button- On clicked- Set Name to textbox.text

Is that how I get the player's name to save? And if so, how do I make the button save the name and go to the next screen at the same time?
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 3:13 am

You're saving the text in text box, which would be whatever the player decides to enter as their name.

You can add the action go to next layout in the same event.

Have you done the beginner tutorials?
Mistakes were made.
B
49
S
24
G
107
Posts: 1,579
Reputation: 60,299

Post » Tue Apr 11, 2017 10:04 pm

oosyrag wrote:You're saving the text in text box, which would be whatever the player decides to enter as their name.

You can add the action go to next layout in the same event.

Have you done the beginner tutorials?


Sadly, no I haven't. Some of the things I'm looking for aren't there.
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 10:07 pm

oosyrag wrote:You're saving the text in text box, which would be whatever the player decides to enter as their name.

You can add the action go to next layout in the same event.

Have you done the beginner tutorials?


Sadly, I haven't because some of the things I'm looking for aren't there.

EDIT: OK so I programmed it in the same action, yet the button is broken? It doesn't seem to do anything. I have the following:

Button- On clicked- Set Name to Textbox.text
- Go to layout 3

It won't go to layout 3.
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 10:40 pm

Without seeing what you did, I can only say you did something wrong.

Here is an updated example with layout switching: https://www.dropbox.com/s/881zxb3m1ch94 ... .capx?dl=0
Mistakes were made.
B
49
S
24
G
107
Posts: 1,579
Reputation: 60,299

Post » Tue Apr 11, 2017 10:44 pm

Message: MKP1000 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
oosyrag wrote:Without seeing what you did, I can only say you did something wrong.

Here is an updated example with layout switching: https://www.dropbox.com/s/881zxb3m1ch94 ... .capx?dl=0


OK I think I see where I've gone wrong. Thank you so much for all the help!
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 11:45 pm

Message: MKP1000 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
oosyrag wrote:Without seeing what you did, I can only say you did something wrong.

Here is an updated example with layout switching: https://www.dropbox.com/s/881zxb3m1ch94 ... .capx?dl=0


Sorry, it's me again. Is there any way other than Dropbox that I could send the project to you? I just want to see if you can see what's wrong, if you don't mind of course.
B
6
S
1
G
1
Posts: 23
Reputation: 900

Post » Tue Apr 11, 2017 11:57 pm

Google Drive works fine.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,579
Reputation: 60,299

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: marc254 and 7 guests