How do I set text from a Text Box to a text variable?

Get help using Construct 2

Post » Wed Sep 30, 2015 7:53 am

So basically what I want to achieve is a text box where you can fill in your name, and when you click a submit button, it will submit the content, that you filled in, into a global variable.


I tried this:
adding a global text with the name: 'name'.
Adding a Text Box named NameBox.
Adding a sprite named SubmitButton.

Then adding an event that says:
On Left button clicked on 'SubmitButton'; Set "NameBox" to Global text 'name'

This resulted in it setting the SubmitButton to literally the word "NameBox"


How do I get Construct 2 to read what's in a Text Box, and put it in a Global text?

Thanks,
Jasper
B
4
S
1
Posts: 3
Reputation: 256

Post » Wed Sep 30, 2015 7:57 am

set the global variable to : NameBox.Text
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 30, 2015 8:42 am

LittleStain wrote:set the global variable to : NameBox.Text

Thanks, it worked!
I appreciate the fast response.
B
4
S
1
Posts: 3
Reputation: 256


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 8 guests