Script problem ; keyboard stops working in missions
by Gary "ChunkyKs" Briggs · in Torque Game Engine · 11/17/2006 (2:32 pm) · 5 replies
Hola
This used to work pre-1.5, but in 1.5 I'm getting a problem where I hold down the C key, the ui pops up... and as soon as I release the C key, all keyboard input seems to stop working [although the mouse and mouse buttons still work].
This is happening in a running mission. I'm on Mactel, latest panther and latest XCode.
I nabbed the activateKeyboard() line out of the console dialog function, but it didn't make a difference.
What's odd is that if I hit ' to bring up the console, then keyboard input works, and remains working after I close the console. The C shortcut no longer works after releasing the button, either.
Any ideas?
Thanks,
Gary (-;
This used to work pre-1.5, but in 1.5 I'm getting a problem where I hold down the C key, the ui pops up... and as soon as I release the C key, all keyboard input seems to stop working [although the mouse and mouse buttons still work].
This is happening in a running mission. I'm on Mactel, latest panther and latest XCode.
moveMap.bind( keyboard, c, togglePhysicsUI );
function togglePhysicsUI( %val )
{
if( %val ) {
cursorOn();
Canvas.pushDialog(PhysicsDlg,99);
} else {
Canvas.popDialog(PhysicsDlg);
cursorOff();
activateKeyboard(); // Added recently, doesn't make a difference
}
}I nabbed the activateKeyboard() line out of the console dialog function, but it didn't make a difference.
What's odd is that if I hit ' to bring up the console, then keyboard input works, and remains working after I close the console. The C shortcut no longer works after releasing the button, either.
Any ideas?
Thanks,
Gary (-;
#2
12/01/2006 (5:02 pm)
Try defining the bind after the function is defined
#3
Gary (-;
12/01/2006 (5:08 pm)
It is right now. I tried defining it before the function, too, just in case, but that didn't make a difference.Gary (-;
#4
Long story short, the dialog does what I want until I add a GuiTabPageCtrl as a child of a GuiTabBookCtrl. tdn is devoid of useful information about these two controls as can be seen from the links.
So, uh, yeah. Any ideas as to what's up?
Gary (-;
12/01/2006 (7:05 pm)
I've tried reimplementing the same dialog from scratch, to see at what point it breaks.Long story short, the dialog does what I want until I add a GuiTabPageCtrl as a child of a GuiTabBookCtrl. tdn is devoid of useful information about these two controls as can be seen from the links.
So, uh, yeah. Any ideas as to what's up?
Gary (-;
#5
but if i open the editor (or console) and exit out again... then it all works?
12/01/2006 (7:12 pm)
Ive noticed this on my stock 1.5 as well... when i go into the editor then exit... all keyboard commands are non-functioning.but if i open the editor (or console) and exit out again... then it all works?
Torque Owner Gary "ChunkyKs" Briggs
brokenui.tar.gz
This code will exhibit the problem. Extract it in a starter.fps or similar dir, open torque and start a mission. Once the mission is going, open the console and type
exec("brokenui/main.cs");And the problem manifests itself. Hold down C and the dialog appears, and you can still move about with stuff in the moveMap. As soon as you let go of C and the ui disappears, the problem appears. If you modify the code so that it's like the console; hit it once to make it appear, hit it again to make it disappear, then the problem only happens when the UI disappears.
Anyone?
Gary (-;