Set Text to global value?

For questions about using Classic.

Post » Sun Jun 05, 2011 5:50 am

See subject.
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Sun Jun 05, 2011 6:30 am

set Global('globalname') to textbox.text

it might be listed as, 'Get Text'
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sun Jun 05, 2011 7:35 am

What if't its words, not numbers.
On the game, I'm making it where you put your name in a edit box, and I need the global varaible to change to the word entered. But I don't how to get it to do that.
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Sun Jun 05, 2011 8:13 am

It should work fine, I just gave it a test, I made two text boxes and one global variable, I then set the global variable to textbox1's text, and then set textbox2's text to the global variable and it came out fine.
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sun Jun 05, 2011 8:39 am

But how do you set the global vairable to what you wrote. I know you gotta go to system, then to "set value" but what do you put in the "set value" box?
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Sun Jun 05, 2011 8:59 am

Putting:
textboxnamehere.Text should be sufficient :)

If you want to get there by clicking, at the global variable's 'set value' box, double click on the text box icon down at the bottom of the window and select, 'get text' from the list.
Hope that helps
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sun Jun 05, 2011 9:04 am

Thanks alot for taking time to help me Arcticus!
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Sun Jun 05, 2011 11:02 am

No problem! Good luck with your games!
B
3
S
2
G
5
Posts: 351
Reputation: 2,377


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests