Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi!,
So I'm modifying scirra's online multiplayer example, and I've hit a bump.
I want to make it so that when you press enter, the chat text box appears and gets focused. I don't want it visible all the time. I added the event "when press enter -> focus", but when I press enter it only changes to visible, and I have to click it to focus it.
Any help is appreciated. Line 75.
https://dl.dropboxusercontent.com/u/200 ... layer.capx
Thanks!
Develop games in your browser. Powerful, performant & highly capable.
You can fix it by putting the tiniest of waits in between visible and focused, like 0.1 seconds.
A million thanks! It works now.
use a clobal variable name ChatoOn/off : 1
keybord on return presses
System trigger once add 1 ChatoOn/off
system ChatoOn/off = 1 set chatTextbox focused
system ChatoOn/off = 2 set chatTextbox unfocused
system ChatoOn/off > 2 set ChtaOn/Off= 1