Accepting input into a string variable?

Get help using Construct 2

Post » Sun Jan 26, 2014 2:45 pm

Hi guys,

Is there a way of requesting input from the user? Say an inputbox where they put their name if they get a high score? Or do we just let them fill the text box in and store the data into a local storage key?

Thanks!
B
5
S
1
Posts: 44
Reputation: 465

Post » Sun Jan 26, 2014 3:07 pm

Add from object/form control/text box rather than object/general/text
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Jan 26, 2014 3:28 pm

What other way would you like to have besides textbox?
If it's keyboardinput you want that would seem the most logical.

If it's the look of the textbox you don't like, it can be adjusted or you could use the input while having the textbox invisible to create a spritefont portraying the textbox input.
I think there are also some other solutions on the forum, because coccoonjs didn't have textbox. Searching for coccoonjs and textbox should give some ideas.
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 » Sun Jan 26, 2014 3:56 pm

Once again it looks like I didn't read the question !

Sorry - I thought you were trying to use the text as an input rather than a text box
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Jan 26, 2014 5:13 pm

Thanks guys, when the user dies and they beat their highscore I wanted them to enter their name and have it go on the Top 10 Score layout. I guess I could create a new layout for the user to add their name. Or could I have an invisible text box and have it become visible upon the players death?
B
5
S
1
Posts: 44
Reputation: 465

Post » Sun Jan 26, 2014 5:21 pm

It doesn't have to be invisible, you could just create it on player death..
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


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, R0J0hound, trance and 22 guests