"Enter" = keycode 13 for textbox addon

Get help using Construct 2

Post » Sun Sep 23, 2012 5:34 am

Dear all experts...

I am building chat system for my game and I dont wanna create a send button to save GUID. I believe that I can fond "Enter key press = key code 13" for textbox addon but until now it's inefficiencies.

Could you guys please help me to know how do I trigger event once KeyCode = 13 (meaning that Enter is pressed) in textbox addon

Sorry about my English

Best regards
B
11
S
2
Posts: 73
Reputation: 1,438

Post » Sun Sep 23, 2012 4:54 pm

I just took the submit button off my high score screen, I was having too much trouble with the button.
I did it with the Keyboard object.
Event conditions:

Keyboard Return is down
System Trigger Once

In the event, it reads whatever is in the text field. So you would know the next character in the box was a Return Key.
I added the "System trigger once" so it wouldn't submit more than one time.

Is that what you mean, or at least offer an idea?


B
200
S
51
G
30
Posts: 897
Reputation: 36,496

Post » Sun Sep 23, 2012 8:16 pm

Dear Paradox
There are problem1...
1. Keyboard object don't recognize the "Enter" press event once your focus is in textbox addon.
2. Type of textbox addon in html is differ from canvas...:(..

You can test this case very easy. Add textbox addon and Keyboard object to check their behaviors while "Enter" is pressed...

Thank a lot...
B
11
S
2
Posts: 73
Reputation: 1,438

Post » Mon Sep 24, 2012 6:18 am

I got solution, replace TextboxAddon by official Textbox...it's working perfectly for my Game
B
11
S
2
Posts: 73
Reputation: 1,438


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 25 guests