Binding Fire to Keyboard 1 Strange Behavior
by Sean Burgoon · in Torque Game Engine · 01/11/2009 (2:52 am) · 2 replies
Hey Everyone,
I'm truckin along getting used to TGEA, but I've run into a weird problem. If I bind the $mvTrigger0++ to Keyboard 1, it ends up working as a toggle (one press starts it firing over and over, one press turns it off). The same thing happens if I use %val to set it to 1 and 0 on up/down. On the other hand, if I bind it to Keyboard 2 instead, it works perfectly fine. In fact, if I bind it to both, pressing 2 fires once each time, pressing 1 works as a toggle... using the same exact bind function. Any idea what's going on? I haven't quite dug down in the code yet to try and figure it out (I'll do that tomorrow) but I was hoping maybe someone else has already had this problem. Thanks!
-Sean
I'm truckin along getting used to TGEA, but I've run into a weird problem. If I bind the $mvTrigger0++ to Keyboard 1, it ends up working as a toggle (one press starts it firing over and over, one press turns it off). The same thing happens if I use %val to set it to 1 and 0 on up/down. On the other hand, if I bind it to Keyboard 2 instead, it works perfectly fine. In fact, if I bind it to both, pressing 2 fires once each time, pressing 1 works as a toggle... using the same exact bind function. Any idea what's going on? I haven't quite dug down in the code yet to try and figure it out (I'll do that tomorrow) but I was hoping maybe someone else has already had this problem. Thanks!
-Sean
About the author
#2
-Sean
01/11/2009 (12:37 pm)
Thanks for the link, that's a great explanation of the system and will help a lot. The only thing I'm still confused about is why 1 keyboard button would have a different behavior (IE, causing it to continuously fire) than another with the same exact bind command calling the same exact function. I'll do a debug build today and see if I can figure it out, or if someone knows why that would happen, let me know.-Sean
Torque Owner Ivan Mandzhukov
Liman3D
datablock ShapeBaseImageData(CrossbowImage) {................ // Ready to fire, just waiting for the trigger stateName[2] = "Ready"; stateTransitionOnNoAmmo[2] = "NoAmmo"; [b]stateTransitionOnTriggerDown[2] = "Fire";[/b] ................. };Read here:
www.garagegames.com/mg/forums/result.thread.php?qt=73873